if (self.CavalryLogger) { CavalryLogger.start_js(["rFgRt"]); } __d("WorkAdminSetupUsersFixableErrorCode",[],(function(a,b,c,d,e,f){e.exports={1789043:"SCIM__BULK_ADD_MISSING_COLUMNS_FLEXIBLE",1789053:"SCIM__BULK_ADD_MISSING_SEMI_REQUIRED_COLUMNS",1789036:"SCIM__BULK_ADD_UNRECOGNIZED_COLUMNS"}}),null); __d("BrowseFacebarHighlighter",["csx","CSS","NodeHighlighter"],(function(a,b,c,d,e,f,g){"use strict";a={};Object.assign(a,b("NodeHighlighter"),{getHighlightCandidates:function(){return["._53ad"]},isDiscardNode:function(a){return b("CSS").hasClass(a,"DefaultText")},createSegmentedRegex:function(a){a=this.escapeAndAddBidirectionalCharsToTokens(a);return"(^|\\s|\\b)("+a.join("|")+")"}});e.exports=a}),null); __d("cometSearchTypeaheadBaseMemoizeEntryKey",["cometUniqueID","memoizeStringOnly"],(function(a,b,c,d,e,f){"use strict";var g=b("memoizeStringOnly")(function(a){return b("cometUniqueID")()});function a(a){return g(a)}e.exports=a}),null); __d("CometSearchTypeaheadBaseDataEntry",["cometSearchTypeaheadBaseMemoizeEntryKey"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(a){this.$1=null,this.$2=null,this.$3=null,this.$4="",this.$3=a}var c=a.prototype;c.getMetaData=function(){return this.$1};c.setMetaData=function(a){this.$1=a;return this};c.hasMetadaData=function(){return this.$1!=null};c.getRawData=function(){return this.$2};c.setRawData=function(a){this.$2=a;return this};c.hasRawData=function(){return this.$2!=null};c.getLabel=function(){return this.$4};c.setLabel=function(a){this.$4=a;return this};c.getKey=function(){var a;return(a=this.$3)!=null?a:b("cometSearchTypeaheadBaseMemoizeEntryKey")(this.$4)};c.toString=function(){return this.getKey()+"-"+this.$4};return a}();e.exports=a}),null); __d("CometSearchTypeaheadBaseLoggingProvider",[],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(a){a=a.log;this.$3=null;this.$4=null;this.$2=a}var b=a.prototype;b.addEvent=function(a){if(this.$1==null)return;this.$1&&this.$1.push(a)};b.endSession=function(){var a=this.$4,b=this.$3,c=this.$1;if(a==null||b==null||c==null)return;this.$2({endTimeMs:Date.now(),events:c.slice(0,c.length),sessionID:b,startTimeMs:a});this.$3=null;this.$1=null};b.getSessionID=function(){return this.$3};b.startSession=function(a){if(this.$1!=null)return;this.$4=Date.now();this.$3=a;this.$1=[]};return a}();e.exports=a}),null); __d("SearchTypeaheadLoggingSessionFalcoEvent",["FalcoLoggerInternal"],(function(a,b,c,d,e,f){"use strict";a=b("FalcoLoggerInternal").create("search_typeahead_logging_session");e.exports=a}),null); __d("cometSearchTypeaheadFalcoLoggingSessionLogBuilder",["SearchTypeaheadLoggingSessionFalcoEvent"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=12;function a(a,c){return function(d){var e=h(a,c,d);b("SearchTypeaheadLoggingSessionFalcoEvent").logImmediately(function(){return{session:e}})}}function h(a,b,c){var d=c.events,e=c.startTimeMs,f=c.endTimeMs;c=c.sessionID;var h=d.filter(function(a,b){return b=d.length-Math.ceil(g/2)});return{context:a,end_time_ms:f,events:h.map(i),scoped_entity_id:b,session_id:c,start_time_ms:e}}function i(a){var b=a.action,c=a.entries,d=a.queryString,e=a.entry;a=a.sequenceID;return{action_type:b,entries:c!=null?c.map(j):[],entry:e!=null&&c!=null?j(e,c.indexOf(e)):null,query:(b=d)!=null?b:"",sequence_id:a}}function j(a,b){var c,d=a.getMetaData();return{entity_id:d==null?void 0:(c=d.logging)==null?void 0:c.entityID,entity_type:d==null?void 0:(c=d.logging)==null?void 0:c.entityType,id:a.getKey(),index_in_group:b,label:a.getLabel(),logging_id:d==null?void 0:(c=d.logging)==null?void 0:c.loggingID,sequence_id:d==null?void 0:(b=d.logging)==null?void 0:b.sequenceID,source:k(a)}}function k(a){__p&&__p();a=a.getMetaData();if(a==null)return"backend";a=a.markers;if(a.has("see_all"))return"escape";if(a.has("echo"))return"echo";if(a.has("recent"))return"recent_searches";return a.has("bootstrap")?"bootstrap":"backend"}e.exports=a}),null); __d("TypeaheadFacepileX.react",["React","joinClasses"],(function(a,b,c,d,e,f){__p&&__p();a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g=3)return[d.renderPic(0,"leftpic"),d.renderPic(1,"toppic"),d.renderPic(2,"bottompic")];else return[d.renderPic(0,"leftpic"),d.renderPic(1)]},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return b("React").createElement("span",babelHelpers["extends"]({},this.props,{className:b("joinClasses")(this.props.className,"splitpics clearfix")}),this.renderPics())};return c}(b("React").Component);e.exports=a}),null); __d("FacebarResultStoreUtils",["FacebarGlobalOptions","FacebarJSConstants"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={getQueryFeatures:function(a){__p&&__p();var c={};if(b("FacebarGlobalOptions").enableBootstrapRanking){a.raw_text&&(c.FEATURE_QUERY_LENGTH=a.raw_text.length);if(a.tokens){c.FEATURE_QUERY_TOKENS=a.tokens.length;c.FEATURE_QUERY_TOKEN_LENGTH_SUM=0;for(var d=0;d0){d=b.split(" ").length;e=0;for(var f=0;f=0&&e++;a.features.FEATURE_TITLE_TOKEN_MATCH_FRACTION=e/d}if(c.tokens&&c.tokens.length>0){f=b.search(c.tokens[0]);a.features.FEATURE_FIRST_TERM_MATCH_POSITION=f;a.features.FEATURE_FIRST_TERM_MATCH_TOKEN=b.substring(0,f+c.tokens[0].length).split(" ").length;a.termMatches.some(function(b){if(b.search(c.tokens[0])===0){a.features.FEATURE_FIRST_TERM_MATCH_TOKEN_FRACTION=c.tokens[0].length/b.length;return!0}return!1});a.features.FEATURE_IN_ORDER_MATCH=1;c.tokens.length>1&&(f=b.search(c.tokens[1]),a.features.FEATURE_SECOND_TERM_MATCH_POSITION=f,a.features.FEATURE_SECOND_TERM_MATCH_TOKEN=b.substring(0,f+c.tokens[1].length).split(" ").length,a.termMatches.some(function(b){if(b.search(c.tokens[1])===0){a.features.FEATURE_FIRST_TERM_MATCH_TOKEN_FRACTION=c.tokens[0].length/b.length;return!0}return!1}),a.features.FEATURE_SECOND_TERM_MATCH_TOKENb[e][0]?c[f++]=b[e++]:c[f++]=a[d++];return c.concat(a.slice(d),b.slice(e))}function r(a,b,c){if(!c)return!1;var d=t(c,a);return s(a,b,c,d)||s(a,b,c,d+1)}function s(a,b,c,d){if(!c[d])return!1;var e=c[d][0];c=c[d][1];return!(a+b-1e+c-1)}function t(a,b){var c=0,d=a.length-1;while(c<=d){var e=Math.floor((c+d)/2),f=a[e][0];if(f==b)return e;else f=0)return{id:d.id,name:f,type:d.type,offset:e}})}d={};d.parse=a;d.parseWithoutMentions=c;e.exports=d}),null); __d("HashtagSearchResultUtils",["fbt","FacebarResultStoreUtils","HashtagParser","HashtagSearchResultConfig","URI"],(function(a,b,c,d,e,f,g){__p&&__p();a={getHashtagFromQuery:function(a){a=b("HashtagParser").parse(a);return a&&a.length===1&&a[0].offset===0?a[0].tag:!1},makeTypeaheadResult:function(a){var c=g._("Hashtag");return{category:c,path:new(b("URI"))("/hashtag/"+a).toString(),photo:b("HashtagSearchResultConfig").image_url,rankType:null,replace_results:b("HashtagSearchResultConfig").boost_result?!0:!1,scaled_score:1,score:0,text:"#"+a,type:"hashtag_exact",uid:"hashtag:"+a}},makeFacebarEntry:function(a){var c=g._("Hashtag");return{category:c,path:new(b("URI"))("/hashtag/"+a).toString(),photo:b("HashtagSearchResultConfig").image_url,replace_results:b("HashtagSearchResultConfig").boost_result?!0:!1,text:"#"+a,type:"hashtag_exact",uid:"hashtag:"+a}},makeFacebarResult:function(a){var c=b("FacebarResultStoreUtils").processEntityResult("hashtag_exact","hashtag:"+a,"#"+a,b("HashtagSearchResultConfig").hashtag_cost);c.parse={display:[{type:"ent:hashtag_exact",uid:"hashtag:"+a}],remTokens:[],suffix:""};c.tags={hashtag:"hashtag"};return c}};e.exports=a}),null); __d("SearchClientFunnelTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("search_client_funnel:SearchClientFunnelLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("search_client_funnel:SearchClientFunnelLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("search_client_funnel:SearchClientFunnelLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setActionName=function(a){this.$1.action_name=a;return this};c.setLastState=function(a){this.$1.last_state=a;return this};c.setSelectedID=function(a){this.$1.selected_id=a;return this};c.setSelectedText=function(a){this.$1.selected_text=a;return this};c.setSelectedType=function(a){this.$1.selected_type=a;return this};c.setTypeaheadSid=function(a){this.$1.typeahead_sid=a;return this};c.setTypedQuery=function(a){this.$1.typed_query=a;return this};return a}();c={action_name:!0,last_state:!0,selected_id:!0,selected_text:!0,selected_type:!0,typeahead_sid:!0,typed_query:!0};e.exports=a}),null); __d("WorkCommunityCenterTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:WorkCommunityCenterLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:WorkCommunityCenterLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:WorkCommunityCenterLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setActionReason=function(a){this.$1.action_reason=a;return this};c.setActionType=function(a){this.$1.action_type=a;return this};c.setAppID=function(a){this.$1.appid=a;return this};c.setAppversion=function(a){this.$1.appversion=a;return this};c.setClienttime=function(a){this.$1.clienttime=a;return this};c.setContainermodule=function(a){this.$1.containermodule=a;return this};c.setCountry=function(a){this.$1.country=a;return this};c.setDeviceid=function(a){this.$1.deviceid=a;return this};c.setEvent=function(a){this.$1.event=a;return this};c.setFileExtension=function(a){this.$1.file_extension=a;return this};c.setIsemployee=function(a){this.$1.isemployee=a;return this};c.setMapAdminID=function(a){this.$1.map_admin_id=a;return this};c.setMapAdminRole=function(a){this.$1.map_admin_role=a;return this};c.setMapEmailAddress=function(a){this.$1.map_email_address=a;return this};c.setMapFullName=function(a){this.$1.map_full_name=a;return this};c.setMapLocation=function(a){this.$1.map_location=a;return this};c.setMapReminderType=function(a){this.$1.map_reminder_type=a;return this};c.setMapReportedContentID=function(a){this.$1.map_reported_content_id=a;return this};c.setMetric=function(a){this.$1.metric=a;return this};c.setName=function(a){this.$1.name=a;return this};c.setOverrideCommunity=function(a){this.$1.override_community=a;return this};c.setReferrer=function(a){this.$1.referrer=a;return this};c.setSection=function(a){this.$1.section=a;return this};c.setSectionIsUnread=function(a){this.$1.section_is_unread=a;return this};c.setSessionID=function(a){this.$1.session_id=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setUuid=function(a){this.$1.uuid=a;return this};c.setVC=function(a){this.$1.vc=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};c.updateExtraData=function(a){a=b("nullthrows")(b("GeneratedLoggerUtils").serializeMap(a));b("GeneratedLoggerUtils").checkExtraDataFieldNames(a,g);this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.addToExtraData=function(a,b){var c={};c[a]=b;return this.updateExtraData(c)};return a}();var g={action_reason:!0,action_type:!0,appid:!0,appversion:!0,clienttime:!0,containermodule:!0,country:!0,deviceid:!0,event:!0,file_extension:!0,isemployee:!0,map_admin_id:!0,map_admin_role:!0,map_email_address:!0,map_full_name:!0,map_location:!0,map_reminder_type:!0,map_reported_content_id:!0,metric:!0,name:!0,override_community:!0,referrer:!0,section:!0,section_is_unread:!0,session_id:!0,time:!0,uuid:!0,vc:!0,weight:!0};e.exports=a}),null); __d("MercuryFilters.re",["MercuryFilters.bs"],(function(a,b,c,d,e,f){__p&&__p();a=b("MercuryFilters.bs").all;f.all=a;c=b("MercuryFilters.bs").unread;f.unread=c;d=b("MercuryFilters.bs").groups;f.groups=d;e=b("MercuryFilters.bs").getSupportedFilters;f.getSupportedFilters=e;a=b("MercuryFilters.bs").isSupportedFilter;f.isSupportedFilter=a}),null); __d("ReactFlareEventUtils",[],(function(a,b,c,d,e,f){"use strict";__p&&__p();function a(a){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!1,!1,window,0,a.screenX||0,a.screenY||0,a.pageX||0,a.pageY||0,a.ctrlKey||!1,a.altKey||!1,a.shiftKey||!1,a.metaKey||!1,0,null);g(b,"type","click");g(b,"buttons",0);g(b,"which",0);g(b,"target",a.target);g(b,"currentTarget",a.target);g(b,"srcElement",a.target);return b}function g(a,b,c){Object.defineProperty(a,b,{get:function(){return c}})}e.exports={createFromReactFlareEvent:a}}),null); __d("WorkAdminIntroductionNuxGating",["SimpleNUXMessage","SimpleNUXMessageTypes","WorkPermissions","qex"],(function(a,b,c,d,e,f){"use strict";function a(){var a=b("WorkPermissions").permissions.includes("manage_users");if(!a)return!1;a=(a=b("qex")._("1018202"))!=null?a:!1;var c=b("SimpleNUXMessage").hasUserSeenMessage(b("SimpleNUXMessageTypes").WORK_ACTIVATION_ADMIN_INTRODUCTION);return a&&!c}e.exports={shouldShowAdminIntroductionNux:a}}),null); __d("WorkGalahadBadgingDispatcher",["ExplicitRegistrationDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(b,a);function b(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f1&&(b=d[1])}return b},getGroupView:function(a){var b=null;for(var c=0;c1)return b("enumUtils").assert(d[1],b("WorkResellerConsoleSection"))}return null},getResellerCustomerId:function(a){for(var b=0;b2)return c[2]}return null},getPermalinkID:function(a){var b=null;for(var c=0;c=4&&d[0]==="groups"&&d[2]==="permalink"&&(b=d[3])}return b},getTeamID:function(a){for(var b=0;b1)return c[1]}return null},getSearchEdgeType:function(a){for(var b=0;b1)return c[1]}return null},getAboutOrgSection:function(a){for(var c=0;c1)return b("enumUtils").assert(d[1],b("WorkAboutOrgSection"))}return null},serialize:function(a){return a},fromString_DO_NOT_USE:function(a){return a}};function m(a,b){__p&&__p();a=a;var c=!1;for(var b=b,d=Array.isArray(b),e=0,b=d?b:b[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var f;if(d){if(e>=b.length)break;f=b[e++]}else{e=b.next();if(e.done)break;f=e.value}f=f;f!==void 0?(c&&g(0,832),a+="/"+f):c=!0}return a}e.exports=l}),null); __d("WorkGalahadNavStore",["FluxReduceStore","WorkGalahadDispatcher","WorkGalahadEntityKey","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record({activeEntityKeys:[],loading:!1,seenGroups:b("immutable").Set(),seenGroupPosts:b("immutable").Set(),selectedAppTabID:"home",publicContentBanner:void 0,stackedChannelData:null,pendingTransitionState:{},showSearchOverlay:!1}));a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return new g()};d.reduce=function(a,b){__p&&__p();switch(b.type){case"nav/markPendingTransition":return a.set("pendingTransitionState",{appTabID:b.appTabID,entityKeys:b.entityKeys,uri:b.uri});case"nav/setActiveEntityKeys":return this.$WorkGalahadNavStore1(a,b.entityKeys);case"nav/selectAppTabID":return this.$WorkGalahadNavStore2(a,b.appTabID);case"nav/selectStackedChannel":return a.set("stackedChannelData",b.stackedChannelData);case"nav/dismissStackedChannel":return a.set("stackedChannelData",null);case"nav/startLoading":var c=a.set("loading",!0);b.uri===c.pendingTransitionState.uri&&(c=this.$WorkGalahadNavStore1(c,c.pendingTransitionState.entityKeys||c.activeEntityKeys),c=this.$WorkGalahadNavStore2(c,c.pendingTransitionState.appTabID||c.selectedAppTabID));return c.set("pendingTransitionState",{});case"nav/stopLoading":return a.set("loading",!1);case"nav/showPublicContentBanner":return a.set("publicContentBanner",b.html);case"nav/hidePublicContentBanner":return a.set("publicContentBanner",void 0);case"nav/showSearchOverlay":return a.set("showSearchOverlay",!0);case"nav/hideSearchOverlay":return a.set("showSearchOverlay",!1);default:return a}};d.isSearchOverlayShown=function(){return this.getState().showSearchOverlay};d.getActiveEntityKeys=function(){return this.getState().activeEntityKeys};d.getSelectedAppTabID=function(){return this.getState().selectedAppTabID};d.getStackedChannelData=function(){return this.getState().stackedChannelData};d.isLoading=function(){return this.getState().loading};d.hasGroupBeenSeen=function(a){return this.getState().seenGroups.has(a)};d.hasGroupPostBeenSeen=function(a){return this.getState().seenGroupPosts.has(a)};d.getPublicContentBanner=function(){return this.getState().publicContentBanner};d.$WorkGalahadNavStore1=function(a,c){if(a.activeEntityKeys.length===c.length&&a.activeEntityKeys.every(function(a,b){return a===c[b]}))return a;var d=a.seenGroups,e=b("WorkGalahadEntityKey").getGroupID(c);e!=null&&(d=d.add(e));e=a.seenGroupPosts;var f=b("WorkGalahadEntityKey").getPermalinkID(c);f!=null&&(e=e.add(f));return a.set("activeEntityKeys",c).set("seenGroups",d).set("seenGroupPosts",e)};d.$WorkGalahadNavStore2=function(a,b){return a.selectedAppTabID!==b?a.set("selectedAppTabID",b).set("stackedChannelData",null):a};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkGalahadDispatcher"))}),null); __d("WorkGalahadBadging",["NotificationConstants","NotificationSeenState","NotificationUpdates","SubscriptionsHandler","WorkAdminIntroductionNuxGating","WorkGalahadBadgingActions","WorkGalahadDirectActions","WorkGalahadDirectStore","WorkGalahadNavStore","createObjectFrom","GlobalNotificationSubscriptionsSubscription","GlobalNotificationSyncSubscription"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("NotificationConstants").PayloadSourceType,h=0,i=new(b("SubscriptionsHandler"))();function a(a){a.onLoaded(function(a){a=a.unseenNotifs;return j(a)})}function j(a){b("GlobalNotificationSubscriptionsSubscription");b("GlobalNotificationSyncSubscription");b("NotificationUpdates").handleUpdate(g.INITIAL_LOAD,{seenState:b("createObjectFrom")(a,h)});a=function(){return b("WorkGalahadBadgingActions").updateCount("notifications",b("NotificationSeenState").getUnseenCount())};a();i.addSubscriptions(b("NotificationUpdates").subscribe("seen-state-updated",a))}function c(a){b("WorkGalahadDirectActions").initialise(a);a=function(){if(b("WorkGalahadNavStore").getSelectedAppTabID()=="direct")return;b("WorkGalahadBadgingActions").updateCount("direct",b("WorkGalahadDirectStore").getUnreadCount())};a();i.addSubscriptions(b("WorkGalahadDirectStore").addListener(a))}function d(){b("WorkAdminIntroductionNuxGating").shouldShowAdminIntroductionNux()&&b("WorkGalahadBadgingActions").updateCount("admin_panel",1)}e.exports={asyncInitNotifications:a,initNotifications:j,initDirect:c,initAdminPanel:d}}),null); __d("WorkGalahadBadgingStore",["FluxReduceStore","WorkGalahadBadgingDispatcher","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record({badgeCounts:b("immutable").Map()}));function h(a){return a.get("badgeCounts").reduce(function(a,b){return a+b},0)}a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return new g()};c.reduce=function(a,b){switch(b.type){case"update_badge_count":b=a.set("badgeCounts",a.badgeCounts.set(b.section,b.count));return b;default:return a}};c.getTotalBadgeCount=function(){return h(this.getState())};c.getBadgeCount=function(a){return(a=this.getState().badgeCounts.get(a))!=null?a:0};c.getBadgeCounts=function(){return this.getState().badgeCounts};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkGalahadBadgingDispatcher"))}),null); __d("WorkGalahadLocalUISettingsDispatcher",["ExplicitRegistrationDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(b,a);function b(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f=c.length)break;f=c[e++]}else{e=c.next();if(e.done)break;f=e.value}f=f;var g=f[0];f=f[1];if(b("WorkGalahadEntityKey").containsKeyOrSubkey(a,g)){g=f(a);if(g)return g}}return null},getSidebarType:function(a){__p&&__p();var c=this.getHeaderType(a);switch(c){case h.FEED:return i.FEED;case h.PROFILE:c=b("WorkGalahadEntityKey").getUserID(a);var d=b("WorkGalahadEntityKey").getProfileView(a),e=b("WorkGalahadEntityKey").getThreadID(a);if(c!=null&&d!=null&&k(d))return i.PROFILE;return g.WORK_CHAT===d&&e!=null?i.CHAT:null;case h.GROUP_CHAT:return i.CHAT;case h.GROUP:c=b("WorkGalahadEntityKey").getGroupView(a);if(c==null||j(c))return i.GROUP;else return null;case h.NEXT:return i.NEXT;default:if(b("WorkGalahadEntityKey").containsKeyOrSubkey(a,b("WorkGalahadEntityKey").forTimelinePermalink()))return i.FEED;return b("WorkGalahadEntityKey").containsKeyOrSubkey(a,b("WorkGalahadEntityKey").forTeamFeed())?i.FEED:null}}}}),null); __d("WorkGalahadLocalUISettingsActions",["WorkGalahadLocalUISettingsDispatcher"],(function(a,b,c,d,e,f){"use strict";function a(a,c){b("WorkGalahadLocalUISettingsDispatcher").dispatch({type:"rhc/set_collapsed",sidebarType:a,collapsed:c})}function c(a){b("WorkGalahadLocalUISettingsDispatcher").dispatch({type:"notifications/set_filter",filter:a})}function d(a){b("WorkGalahadLocalUISettingsDispatcher").dispatch({type:"pop_ups/set_turned_off",turned_off:a})}e.exports={setRhcCollapsed:a,setNotificationsFilter:c,setPopUpsTurnedOff:d}}),null); __d("WorkGalahadNotificationsFilters",["keyMirror"],(function(a,b,c,d,e,f){a=b("keyMirror")({ALL:null,UNREAD:null,CONVERSATIONS:null,PINNED_GROUPS:null,MULTI_COMPANY_GROUPS:null});e.exports=a}),null); __d("WorkGalahadLocalUISettingsHelper",["FluxHooks","MercuryFilters.re","React","WebStorage","WorkGalahadLayoutUtils","WorkGalahadLocalUISettingsActions","WorkGalahadLocalUISettingsStore","WorkGalahadNavStore","WorkGalahadNotificationsFilters","mapObject"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("FluxHooks").useFluxStore,h=b("React").useCallback,i=b("WorkGalahadLayoutUtils").SidebarType,j="galahadSidebarToggle",k="collapsed",l="expanded",m="galahadNotificationFilter",n="galahadChatsFilter";function o(a){return j+"/"+a}function p(){return b("WorkGalahadNavStore").getActiveEntityKeys()}function q(){return b("WorkGalahadLocalUISettingsStore").getNotificationsFilter()}a={useRhcCollapsedState:function(){var a=g(b("WorkGalahadNavStore"),p),c=b("WorkGalahadLayoutUtils").getSidebarType(a);a=h(function(){return c!=null?b("WorkGalahadLocalUISettingsStore").getRhcCollapsed(c):!0},[c]);a=g(b("WorkGalahadLocalUISettingsStore"),a);var d=h(function(a){c!=null&&b("WorkGalahadLocalUISettingsActions").setRhcCollapsed(c,a)},[c]);return[a,d]},getRhcCollapsedStateFromStorage:function(){var a=b("WebStorage").getSessionStorageForRead();return b("mapObject")(i,function(b){return a!=null?a.getItem(o(b))===k:!1})},saveRhcCollapsedStateToStorage:function(a,c){b("WebStorage").setItemGuarded(b("WebStorage").getSessionStorage(),o(a),c?k:l)},useNotificationFilterState:function(){var a=g(b("WorkGalahadLocalUISettingsStore"),q);return[a,function(a){b("WorkGalahadLocalUISettingsActions").setNotificationsFilter(a)}]},getNotificationsFilterFromStorage:function(){var a=b("WebStorage").getLocalStorageForRead();if(a){a=a.getItem(m);if(a!=null&&b("WorkGalahadNotificationsFilters")[a]!=null)return b("WorkGalahadNotificationsFilters")[a]}return b("WorkGalahadNotificationsFilters").ALL},saveNotificationsFilterToStorage:function(a){b("WebStorage").setItemGuarded(b("WebStorage").getLocalStorage(),m,a)},getChatsFilterFromStorage:function(){var a=b("WebStorage").getLocalStorageForRead();if(a){a=a.getItem(n);if(a!=null&&b("MercuryFilters.re").isSupportedFilter(a))return a}return b("MercuryFilters.re").all},saveChatsFilterToStorage:function(a){b("WebStorage").setItemGuarded(b("WebStorage").getLocalStorage(),n,a)}};e.exports=a}),null); __d("WorkGalahadChatChannelStore",["FluxReduceStore","MessagingTag","WorkGalahadDispatcher","WorkGalahadLocalUISettingsHelper","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record({filter:b("WorkGalahadLocalUISettingsHelper").getChatsFilterFromStorage(),folder:b("MessagingTag").INBOX}));a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return new g()};d.getFolder=function(){return this.getState().folder};d.getFilter=function(){return this.getState().filter};d.reduce=function(a,c){switch(c.type){case"galahad/chat_change_folder":return a.set("folder",c.folder);case"galahad/chat_change_filter":b("WorkGalahadLocalUISettingsHelper").saveChatsFilterToStorage(c.filter);return a.set("filter",c.filter);default:return a}};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkGalahadDispatcher"))}),null); __d("WorkGalahadNavActions",["URI","WorkGalahadBeeperActions","WorkGalahadDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function a(a){var c=a.appTabID,d=a.entityKeys;a=a.uri;b("WorkGalahadDispatcher").dispatch({type:"nav/markPendingTransition",appTabID:c,entityKeys:d,uri:new(b("URI"))(a).getPath()})}function c(a){b("WorkGalahadDispatcher").dispatch({type:"nav/setActiveEntityKeys",entityKeys:a})}function d(a){b("WorkGalahadDispatcher").dispatch({type:"nav/selectAppTabID",appTabID:a}),a==="notifications"?b("WorkGalahadBeeperActions").clearAllNotificationBeeps():a==="chats"&&b("WorkGalahadBeeperActions").clearAllChatBeeps()}function f(a,c,d){b("WorkGalahadDispatcher").dispatch({type:"nav/selectStackedChannel",stackedChannelData:{type:a,title:c,data:d}})}function g(){b("WorkGalahadDispatcher").dispatch({type:"nav/dismissStackedChannel"})}function h(a){b("WorkGalahadDispatcher").dispatch({type:"nav/startLoading",uri:new(b("URI"))(a).getPath()})}function i(){b("WorkGalahadDispatcher").dispatch({type:"nav/stopLoading"})}function j(a){b("WorkGalahadDispatcher").dispatch({type:"nav/showPublicContentBanner",html:a})}function k(){b("WorkGalahadDispatcher").dispatch({type:"nav/hidePublicContentBanner"})}function l(){b("WorkGalahadDispatcher").dispatch({type:"nav/showSearchOverlay"})}function m(){b("WorkGalahadDispatcher").dispatch({type:"nav/hideSearchOverlay"})}e.exports={markPendingTransition:a,setActiveEntityKeys:c,selectAppTabID:d,selectStackedChannel:f,dismissStackedNavigation:g,startLoading:h,stopLoading:i,showPublicContentBanner:j,hidePublicContentBanner:k,showSearchOverlay:l,hideSearchOverlay:m}}),null); __d("WorkGalahadQuickChatStore",["FluxReduceStore","WorkGalahadDispatcher","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record({threadID:null,composing:!1,showInbox:!1}));a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return new g()};c.reduce=function(a,b){switch(b.type){case"quickChat/hide":return a.set("composing",!1).set("showInbox",!1).set("threadID",null);case"quickChat/showCompose":return a.set("composing",!0);case"quickChat/showInbox":return a.set("showInbox",!0).set("composing",!1).set("threadID",null);case"quickChat/hideInbox":return a.set("showInbox",!1);case"quickChat/close":return a.set("threadID",null);case"quickChat/openThreadID":return a.set("threadID",b.threadID).set("showInbox",!1);default:return a}};c.getActiveThreadID=function(){return this.getState().threadID};c.isShowingConversation=function(){return this.getState().threadID!=null};c.isComposing=function(){return this.getState().composing};c.isShowingInbox=function(){return this.getState().showInbox};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkGalahadDispatcher"))}),null); __d("WorkGalahadSearchStore",["FluxReduceStore","WorkGalahadDispatcher","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record({typeaheadListProps:null,query:null}));a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return new g()};c.reduce=function(a,b){switch(b.type){case"galahad/setTypeaheadListProps":return a.set("typeaheadListProps",b.listProps);case"galahad/setQuery":return a.set("query",b.query);default:return a}};c.getTypeaheadListProps=function(){return this.getState().typeaheadListProps};c.getQuery=function(){return this.getState().query};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkGalahadDispatcher"))}),null); __d("WorkGalahadFluxEnv",["invariant","requireCond","Arbiter","cr:1063362","WorkGalahadBadging","WorkGalahadBadgingDispatcher","WorkGalahadBadgingStore","WorkGalahadBeeperActions","WorkGalahadBeeperDispatcher","WorkGalahadBeeperStore","WorkGalahadChatChannelStore","WorkGalahadDirectDispatcher","WorkGalahadDirectStore","WorkGalahadDispatcher","WorkGalahadLocalUISettingsDispatcher","WorkGalahadLocalUISettingsStore","WorkGalahadNavActions","WorkGalahadNavStore","WorkGalahadQuickChatStore","WorkGalahadSearchStore"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();function h(a){a.defaultAppTabID,b("WorkGalahadDispatcher").explicitlyRegisterStores([b("WorkGalahadChatChannelStore"),b("WorkGalahadNavStore"),b("WorkGalahadSearchStore"),b("WorkGalahadQuickChatStore")]),b("WorkGalahadBeeperDispatcher").explicitlyRegisterStores([b("WorkGalahadBeeperStore")]),b("WorkGalahadBadgingDispatcher").explicitlyRegisterStores([b("WorkGalahadBadgingStore")]),b("WorkGalahadLocalUISettingsDispatcher").explicitlyRegisterStores([b("WorkGalahadLocalUISettingsStore")]),b("WorkGalahadDirectDispatcher").explicitlyRegisterStores([b("WorkGalahadDirectStore")]),b("cr:1063362")&&b("Arbiter").subscribeOnce("workGalahad/mountAdminPanel",b("cr:1063362").init)}function i(a){var c=a.defaultAppTabID,d=a.entityKeys,e=a.unseenNotifsPreloader,f=a.unreadDirectStories;a=a.beeperConfig;b("WorkGalahadNavActions").setActiveEntityKeys(d);b("WorkGalahadNavActions").selectAppTabID(c);b("WorkGalahadBadging").asyncInitNotifications(e);b("WorkGalahadBadging").initDirect(f);b("WorkGalahadBadging").initAdminPanel();b("WorkGalahadBeeperActions").setSoundEnabled(a.soundEnabled);b("WorkGalahadBeeperActions").setSoundPath(a.soundPath)}var j=[],k=!1;function l(){while(j.length>0){var a=j.shift();a()}}e.exports={init:function(a){k&&g(0,11757),k=!0,h(a),i(a),l()},queueEvent:function(a){!k?j.push(a):a()}}}),null); __d("WorkGalahadSearchActions",["WorkGalahadDispatcher","WorkGalahadFluxEnv"],(function(a,b,c,d,e,f){"use strict";function a(a){b("WorkGalahadDispatcher").dispatch({type:"galahad/setTypeaheadListProps",listProps:a})}function c(a){b("WorkGalahadFluxEnv").queueEvent(function(){b("WorkGalahadDispatcher").dispatch({type:"galahad/setQuery",query:a})})}e.exports={setTypeaheadListProps:a,setQuery:c}}),null); __d("WorkGalahadChannelItemChromeList.react",["cx","FlexLayout.react","React","stylex"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();function h(a){var c=a.centered,d=a.textType,e=a.roundIcon,f=a.isNested,g=a.isBig,h=a.index,i=a.spacing;a=a.isIndented;var j={animationDelay:h*.1+"s"};return b("React").createElement("li",{className:"_6s9f"+(g?" _6s9i":"")+(i==="narrow"?" _2pi2":"")+(i==="medium"?" _79x2":"")+" _2pih"+(a?" _2piv":"")+(a?"":" _2piu")},b("React").createElement("div",{className:f?"dpt5d2td":""},b("React").createElement(b("FlexLayout.react"),{align:c?"center":"start"},f?null:b("React").createElement("div",{className:b("stylex").dedupe(a?{"margin-end-1":"ewe7nd7x"}:{},a?null:{"margin-end-1":"oypfxdan"},{"flex-0.1":"nisifmay"},{"display-1":"mu99tzkh","justify-content-1":"oitujibm","align-items-1":"t36ehdhz"})},b("React").createElement("div",{className:"_8gyv _6s9g"+(e?" _6s9j":""),style:j})),b("React").createElement("div",{style:{width:"100%",transform:"scaleX("+(Math.abs(Math.sin(h))*(1-.6)+.6)+")",transformOrigin:"center left"},className:"tv52aht6 foph6o47 oitujibm mu99tzkh"},b("React").createElement("div",{className:"mq32vg4l pc5scjqj ouhd256r prqhm3cj h2bzcsm2 nfce3akt hijp0hpg tc9e0ywr bguq3ll9 kv3jftw5 ipp0uhbu au5xxshi ac4n43ct onhkkjna qxyxv99d bpr26ejm ew95mbw3",style:j}),d==="subtitled"?b("React").createElement("div",{className:"mq32vg4l pc5scjqj ouhd256r prqhm3cj h2bzcsm2 nfce3akt hijp0hpg byl60bsq bguq3ll9 kv3jftw5 ipp0uhbu au5xxshi ac4n43ct onhkkjna qxyxv99d bpr26ejm ew95mbw3",style:j}):null,d==="multi"?b("React").createElement(b("React").Fragment,null,b("React").createElement("div",{className:"mq32vg4l pc5scjqj ouhd256r prqhm3cj h2bzcsm2 nfce3akt hijp0hpg byl60bsq bguq3ll9 kv3jftw5 ipp0uhbu au5xxshi ac4n43ct onhkkjna qxyxv99d bpr26ejm ew95mbw3",style:j}),b("React").createElement("div",{className:"mq32vg4l pc5scjqj ouhd256r prqhm3cj h2bzcsm2 nfce3akt hijp0hpg pbwg1s8d bguq3ll9 kv3jftw5 ipp0uhbu au5xxshi ac4n43ct onhkkjna qxyxv99d bpr26ejm ew95mbw3",style:j})):null))))}function i(){return b("React").createElement("li",null,b("React").createElement("div",{className:"t36ehdhz akl1aaa0 mu99tzkh kykouyfj p8o7x76n bv6y7xb9 tgxds0u3"},b("React").createElement("div",{className:"mq32vg4l pc5scjqj ouhd256r prqhm3cj h2bzcsm2 nfce3akt hijp0hpg byl60bsq"})))}function a(a){__p&&__p();var c=a.amount,d=a.type;a=a.withHeader;a=a===void 0?!1:a;var e;switch(d){case"groups":case"teams":e={centered:!0,textType:"single",roundIcon:!1,isNested:!1,isBig:!1,spacing:"narrow",isIndented:!0};break;case"people":e={centered:!0,textType:"single",roundIcon:!0,isNested:!1,isBig:!1,spacing:"narrow",isIndented:!0};break;case"notifications":e={centered:!1,textType:"multi",roundIcon:!0,isNested:!1,isBig:!0,spacing:"narrow",isIndented:!0};break;case"minimall":e={centered:!1,textType:"multi",roundIcon:!0,isNested:!1,isBig:!1,spacing:"narrow",isIndented:!0};break;case"inlineMinimall":e={centered:!1,textType:"multi",roundIcon:!0,isNested:!0,isBig:!1,spacing:"narrow",isIndented:!0};break;case"search":e={centered:!1,textType:"subtitled",roundIcon:!1,isNested:!1,isBig:!1,spacing:"medium",isIndented:!1};break;default:d}d=[];for(var f=0;f-1){a=this._createInviteCoworkersResult(a,c);b.splice(d,0,a)}},_getInsertionIndex:function(a,c){return!a||!b("FacebarGlobalOptions").inviteCoworkers?-1:c.length},_cleanQuery:function(a){return String(a).trim().replace(/\s+/g," ").replace(/[\u200E|\u200F|\u202a|\u202b|\u202c]/g,"")},_createInviteCoworkersResult:function(a,c){var d=h._("Invite \"{query}\" to Workplace",[h._param("query",a)]),e=b("XWorkInviteCoworkersDialogController").getURIBuilder().setEnum("source","search_typeahead").getURI();return{uid:a,icon_class:"_5yiv",isAsync:!1,isInviteCoworkers:!0,structure:b("FacebarStructuredText").fromString(d),semantic:d.toString(),text:d,asyncURI:e,fromCache:c}}};e.exports=a}),null); __d("FacebarResultStore",["CurrentUser","FacebarGlobalOptions","FacebarJSConstants","FacebarResultStoreUtils","FacebarStructuredText","KeywordsSearchResultConfig","SearchI18nMatch","TokenizeUtil","concatMap"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("CurrentUser").isWorkUser(),h=8,i=function(){__p&&__p();function a(a,c,d,e){__p&&__p();var f=this;this._extractStructure=function(a){__p&&__p();function c(a,b,c,d,e){return{type:a==="ent:extend_string"?"text":a,text:b,uid:c||null,isLocal:d?d:!1,categoryName:e?e:null}}function d(b,d){b.split(" ").forEach(function(b){b!==""&&(d&&a.chunks.push(a.structure.length),a.structure.push(c("text",b))),a.structure.push(c("text"," "))}),a.structure.pop()}function e(c){return a.structure.length!==0||b("FacebarJSConstants").nonGrammarTypes[a.type]?c:c.charAt(0).toUpperCase()+c.substr(1)}a.structure=[];a.chunks=[];a.parse.display.forEach(function(b){__p&&__p();if(typeof b==="string")d(e(b),!0);else if(b.type==="ent:extend_string")d(b.text,!0);else if(b.uid){var f=this.getEntry(b.uid,b.fetchType);a.chunks.push(a.structure.length);if(f==null)throw new Error('No entry found for uid "'+b.uid+'", type "'+b.fetchType+'" and piece text "'+b.text+'"');if(f.grammar_like)d(e(f.text),!1);else{var g=b.type;b.fetchType&&(g+=":"+b.fetchType);a.structure.push(c(g,f.text,b.uid,a.isLocal,a.categoryName))}}else b.type=="blank"&&(a.chunks.push(a.structure.length),a.structure.push(c(b.type,"...")))},f);return a};this._processBackendResult=function(a){__p&&__p();if(a.semantic==null)throw new Error("Facebar can't process empty semantic "+JSON.stringify(a));a.semantic=a.semantic.toString();a.backendCost=a.cost;f._extractStructure(a);a.type.match(/^\{.*\}$/)&&(a.useExtendedIndex=!0);a.alternateSemantic&&(a.alternateSemantic=a.alternateSemantic.toLowerCase().replace(/\[(\d*)\]/g,"$1"));if(a.semantic.match(/\[\d*\]/)){var b=a.parse,c=b.pos;if(c===void 0)a.semantic=a.semantic.replace(/\[(\d*)\]/g,"$1");else{var d=b.remTokens[b.remTokens.length-1];b.remTokens.length&&a.structure[a.chunks[d]]&&a.structure[a.chunks[d]].uid&&(c=b.remTokens[b.remTokens.length-1],a.completed=!0);var e=a.structure[a.chunks[c]].uid;if(e===null)a.semantic=a.semantic.replace(/\[(\d*)\]/g,"$1");else{var g=new RegExp("\\["+e+"\\]","g");a.unsubstituted_semantic=a.semantic;a.semantic=a.semantic.replace(g,e);b&&b.disambiguation&&b.disambiguation.length>0&&(b.disambiguation=b.disambiguation.filter(function(a){return a.indexOf("["+e+"]")!==-1}),b.unsubstituted_disambiguation=b.disambiguation.splice(0),b.disambiguation=b.disambiguation.map(function(a){return a.replace(g,e)}))}}}a.semantic=a.semantic.replace(/\[(.*)\]/g,"$1");a.tuid=JSON.stringify({semantic:a.semantic,structure:a.structure});return a};this.facebarConfig=a;this.facebarConfig.grammar_stop_words_penalty=this.facebarConfig.grammar_stop_words_penalty||2;this.facebarConfig.grammar_stop_words=this.facebarConfig.grammar_stop_words||{};this.facebarConfig.options=e;this.injectedSuggestionCount=0;this.tokenize=c;this.getEntry=d;this.typeaheadTypeMap=this.facebarConfig.mapped_types;this.facebarConfig.typeahead_types.forEach(function(a){this.typeaheadTypeMap[a]=a},this);this.unicodeMatch=new(b("SearchI18nMatch"))({prefix_hangul_conjoining_jamo:!0});this.resetCaches()}var c=a.prototype;c.transformStructured=function(a){__p&&__p();var b=[],c=[],d="",e="";a.forEach(function(a,f){if(a.isType("text"))d+=a.getText(),e=e==null?null:e+a.getText();else{f=d.match(/\"/g);f&&f.length%2&&(d=d.replace(/\s+$/,"")+'"');d.length&&(Array.prototype.push.apply(b,this.tokenize(d)),c.push(d),d="");b.push(a.toStruct());c.push({uid:String(a.getUID()),type:this._getFBObjectType(a.getTypePart(1)),text:a.getText()});e=null}},this);a=!1;var f=d;d.length&&(d[d.length-1]=="'"&&(d=d.substr(0,d.length-1)),d.length>0&&d[0]==="#"?Array.prototype.push.call(b,d):d.length>0&&d[0]==="@"?(a=!0,f=this._convertToAliasKey(d.substring(1)),Array.prototype.push.call(b,f)):(f=this._convertToAliasKey(d),Array.prototype.push.apply(b,this.tokenize(d))),c.push(d),d[d.length-1]==" "&&b.push(""));var g=JSON.stringify(c),h=g.replace(/\]$/,"").replace(/\"$/,"");h=h.replace(/\s{2,}/g," ");return{tokens:b,text_form:g,is_empty:!!g.match(/^\[(\"\s*\")?\]$/),raw_text:e,cache_id:h,is_alias_search:a,potential_alias_term:f}};c.resetCaches=function(){this.resetBootstrapCache(),this.resetQueryCache()};c.resetBootstrapCache=function(){this.bootstrapCache={}};c.resetQueryCache=function(){this.queryCache={"":{tokens:[],results:[]}}};c.setNullState=function(a){this.facebarConfig.null_state=a.map(this._extractStructure,this)};c.clearRecentSearches=function(){if(!this.facebarConfig.null_state)return;this.facebarConfig.null_state=this.facebarConfig.null_state.filter(function(a){return!a.isRecent})};c.setSortFunction=function(a){this._sortFunction=a};c.addBootstrap=function(a){var b=this.bootstrapCache;a.forEach(function(a){var c=this.getEntry(a);c.bootstrapped=!0;var d=this.tokenize(c.textToIndex,!0);c.tokens&&Array.prototype.push.apply(d,c.tokens.split(" "));d.forEach(function(c){Object.prototype.hasOwnProperty.call(b,c)||(b[c]={}),b[c][a]=!0})},this)};c._convertToAliasKey=function(a){return a.replace(/\./g,"").toLowerCase()};c.addNullStateToQueryCache=function(a){this.saveResults(this.facebarConfig.null_state,a,!0)};c.getResults=function(a,c){__p&&__p();var d=this;if(a.tokens.length===0||a.tokens.length==1&&a.tokens[0]==="")return{results:this.facebarConfig.null_state||[],null_state:!0};c=this._getBestQueryCache(a.cache_id);c=c.results.filter(function(a){return!a.isRecent});var e={},f=this._getBootstrapMatchByType(a,e),i=this._addMatchingBootstrapResults(a,f[0]||{},e,[]);b("FacebarGlobalOptions").limitBootstrapResult&&(i=i.slice(0,b("FacebarGlobalOptions").limitBootstrapResultNum));var k=[],m=[],n=a.tokens.map(function(a){return a.text!=null?a.text:a}).join(" ").toLowerCase();b("FacebarGlobalOptions").hasKeywordBootstrap&&(k=i.filter(function(a){return a.type===b("FacebarJSConstants").keywordType&&d.unicodeMatch.prefixMatch(a.structure[0].text.toLowerCase(),n)}),k.sort(this._sortFunction(a.raw_text)),m=i.filter(function(a){return a.type!==b("FacebarJSConstants").keywordType&&d.unicodeMatch.prefixMatch(a.structure[0].text.toLowerCase(),n)}),m.sort(this._sortFunction(a.raw_text)),i=m.concat(k));Array.prototype.push.apply(i,b("concatMap")(this._getResultsFromCache.bind(this,f,a),c));b("FacebarGlobalOptions").hasKeywordBootstrap||i.sort(this._sortFunction(a.raw_text));var o={},p=[],q=!1,r=0;i.forEach(function(a){__p&&__p();var c=b("FacebarStructuredText").fromStruct(a.structure);if(c.hasType("blank")){p.push(a);return}a.semantic=a.semantic.toLowerCase();a.termMatches||(a.termMatches=e[a.semantic]);c=l(a,a.semantic);var d=l(a,a.alternateSemantic);if(!c)return;var f=o[c]||d!=null&&o[d];if(f){a.isJSBootstrapMatch?(f.isJSBootstrapMatch=!0,f.bootstrapCost=a.bootstrapCost):f.isJSBootstrapMatch&&a.backendCost!==void 0&&f.backendCost===void 0&&(f.backendCost=a.backendCost);a.tags!=null&&Object.assign(f.tags||{},a.tags);j(a)&&f.keyword_type==="keyword"&&Object.assign(f,a);return}if(q&&a.blankFilled)return;if(a.type.indexOf("browse_type")>=0){r+=1;if(this.facebarConfig.maxGrammarResults!==void 0&&r>this.facebarConfig.maxGrammarResults)return}q=q||!!a.blankFilled;o[c]=a;d&&(o[d]=a);(!g||a.isJSBootstrapMatch||a.position0&&d==b.length||a.type==="shortcut"&&a.termMatches.indexOf(c.tokens[c.tokens.length-1])>=0)&&(a.cacheOnlyResult=!j[a.semantic],(!g||a.position0&&g==e.length&&!(d.type===b("KeywordsSearchResultConfig").result_type&&e.length===1&&e[0]==='"')&&f.push(d);d.type==="shortcut"&&d.termMatches.indexOf(c.tokens[a-1])>=0&&f.push(d);return f};c._addMatchingBootstrapResults=function(a,c,d,e){__p&&__p();var f=a.tokens;return b("concatMap")(function(g){__p&&__p();var h=c[g];if(h===void 0)return[];var i=[],j=b("FacebarResultStoreUtils").getQueryFeatures(a);h.forEach(function(c){__p&&__p();var h=this.getEntry(c,g);if(a.is_alias_search){if(!this._isAliasMatch(a,h,!1))return}else if(!this._isTitleTermMatch(f,h)&&!this._isAliasMatch(a,h,!1)&&!e.includes(c))return;var k=this._isOriginalNameMatch(f,h)||this._isAliasMatch(a,h,!0),l=k?0:this.facebarConfig.non_title_term_match_penalty,m=0;if(this.facebarConfig.enableExactQueryMatchCost){var n=this._isExactNameMatch(a.raw_text,h);m=n?0:this.facebarConfig.non_exact_query_match_penalty}n=this._isNonGrammarTermMatch(f,h);var o=h.grammar_costs?h.grammar_costs["{"+g+"}"]:0,p=g===b("FacebarJSConstants").keywordType?h.cost:0;p=p+o+l+m+this.facebarConfig.entity_cost+this.facebarConfig.grammar_stop_words_penalty*!n;o=b("FacebarResultStoreUtils").processEntityResult(g,c,h.text,p,a,j,d,k,!n);o.bootstrapCost=p;o.isJSBootstrapMatch=!0;o.item_logging_id=h.itemLoggingId;g===b("FacebarJSConstants").keywordType&&(o.iconClass=h.iconClass,o.keywordBootstrapType=h.keywordBootstrapType,o.parse=h.parse,o.subtext=h.subtext,o.boldedSubtext=h.boldedSubtext,o.semantic=h.semantic,o.popularSearchScore=h.popularSearchScore,o.trendingTopicID=h.trendingTopicID,o.photo=h.photo,o.keyword_type=h.keyword_type,o.keywordSource=h.keywordSource);i.push(o)},this);return i}.bind(this),this.facebarConfig.bootstrap_types)};c._isTitleTermMatch=function(a,c){var d=a[0]||{};if(typeof d==="object")return!1;c=c.titleToIndex;return a.length===1?this._isTokenizePrefixMatch(d,c):b("TokenizeUtil").isExactMatch(d,c)};c._isOriginalNameMatch=function(a,c){var d=a[0]||{};if(typeof d==="object")return!1;d=c.text;for(var c=0;c0&&this._isTokenizePrefixMatch(a[a.length-1],d)};c._getNormalizedName=function(a){return a.split(/\W+/).join(",").toLowerCase()};c._isExactNameMatch=function(a,b){return this._getNormalizedName(b.text)===this._getNormalizedName(a)};c._isAliasMatch=function(a,c,d){if(c.alias==null||a.potential_alias_term==null)return!1;c=this._convertToAliasKey(c.alias);if(d||!a.is_alias_search)return b("TokenizeUtil").isExactMatch(a.potential_alias_term,c);else return b("TokenizeUtil").isPrefixMatch(a.potential_alias_term,c)};c._isNonGrammarTermMatch=function(a,c){__p&&__p();c=b("TokenizeUtil").parse(c.titleToIndex.toLowerCase());c=c.tokens.filter(function(a){return a!==""&&!this.facebarConfig.grammar_stop_words[a]},this);c=c.join(" ");for(var d=0;d=0;f--){if(typeof d[f]==="object")break;if(d[f].length&&d[f][0]=='"')break;for(h in this.bootstrapCache[d[f]])g[h]||(g[h]=0),g[h]+f==i-1&&(++g[h],this._addMatchedTerm(h,d[f],b),this._pushBootstrapEntryAtPosition(e,f,h,a.is_alias_search))}if(!a.is_alias_search&&a.potential_alias_term)for(h in this.bootstrapCache[a.potential_alias_term])this._addMatchedTerm(h,a.potential_alias_term,b),g[h]||(g[h]=1,this._pushBootstrapEntryAtPosition(e,0,h,a.is_alias_search));for(var j=c,f=Array.isArray(j),i=0,j=f?j:j[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){if(f){if(i>=j.length)break;d=j[i++]}else{i=j.next();if(i.done)break;d=i.value}b=d;this.getEntry(b)&&!g[b]&&(g[b]=1,this._pushBootstrapEntryAtPosition(e,0,b,a.is_alias_search))}return e};c._addMatchedTerm=function(a,b,c){(c[a]=c[a]||[]).push(b);return c};c._pushBootstrapEntryAtPosition=function(a,b,c,d){__p&&__p();var e=this.getEntry(c);if(!e)return;var f=[];f=[e.type];for(var e=0;e1&&a[1]=="'s"){d.push([b.pos+1]);return 2}else return 1}var h=!1;c=this.getEntry(c,e);if(e!==void 0&&e!==c.fetchType)return 0;e=this.tokenize(f?c.textToIndex:c.text,!0);f=[];for(var c=0;c0){h&&d.push([b.pos+1]);return c}if(d===void 0)return 0;j=a[0];l=j;b.possessive&&j.length>=2&&j.substr(j.length-2)=="'s"&&(l=j.substr(0,j.length-2));b.suffix=b.suffix||"";if(a.length==1&&b.suffix.indexOf(j)===0||b.suffix==l||b.suffix==j){l!=j&&b.suffix==l&&d.push([b.pos+1]);return 1}return 0};c._tryMatchingFinalInsertedEntity=function(a,b,c){if(!c.completed||b<0)return b;var d=c.parse;d=d.remTokens[d.remTokens.length-1];c=c.structure[c.chunks[d]];d=this.getEntry(c.uid,c.type);c=this.tokenize(d.text,!0);b=this._greedyMatchText(c,a,b);return b==a.length-1&&a[b]===""?a.length:b};c._greedyMatchText=function(a,b,c,d,e,f){__p&&__p();for(var g=0;g=0;b--){var c=this.queryCache[a.slice(0,b)];if(c)return c}};c._getFBObjectType=function(a){if(this.typeaheadTypeMap[a])return this.typeaheadTypeMap[a];else return"page"};c._isTokenizePrefixMatch=function(a,c){return b("TokenizeUtil").isPrefixMatch(this.unicodeMatch.prefixMatchPrepare(a),this.unicodeMatch.prefixMatchPrepare(c))};c.getBootstrapMatches=function(a,b){b===void 0&&(b=[]);var c={},d=this._getBootstrapMatchByType(a,c,b?b:[]);return this._addMatchingBootstrapResults(a,d[0]||{},c,b?b:[])};return a}();i.EPSILON=1e-5;i.getUniqueSemantic=function(a){__p&&__p();if(!a)return;var b=[],c=[],d=[];a="("+a+")";var e=a,f=!1;a.replace(/[\(\),]/g,function(g,h){__p&&__p();var i;switch(g){case",":var j=d.length-1;i=e.substr(d[j],h-d[j]);b[j].push(i);d[j]=h+1;break;case"(":d.push(h+1);b.push([]);c.push(h+1);break;case")":if(d.length===0)throw new Error(a+" is not a valid semantic string");j=d.pop();i=e.substr(j,h-j);i=decodeURI(i.replace(/%/g,"%25").replace(/\s/g,"+").trim());j=b.pop();j.push(i);i=j.sort();for(var j=1;j-1){a=this._createSearchMessagesResult(a,d);c.splice(e,0,a)}},_getInsertionIndex:function(a,c){return a.length>0&&b("WorkplaceSearchTypeaheadConfigs").unifySearchBox&&b("WorkGalahadNavStore").getSelectedAppTabID()==="chats"?0:-1},_createSearchMessagesResult:function(a,c){var d=g._("Search Messages for \"{queryString}\"",[g._param("queryString",a)]),e=b("WorkGalahadNavStore").getActiveEntityKeys();e=b("WorkGalahadEntityKey").getThreadID(e);var f=new(b("URI"))(b("WWWBase").uri);e!=null?f.setPath("/chat/t/"+e):f.setPath("/chat");f.addQueryData("qa",a);return{uid:a,isAsync:!1,structure:b("FacebarStructuredText").fromString(d),semantic:a,text:a,uri:f,fromCache:c,type:"keyword",isSeeMessages:!0}}};e.exports=a}),null); __d("FacebarTimerUtils",[],(function(a,b,c,d,e,f){"use strict";a={getTimestamp:function(){return Date.now()}};e.exports=a}),null); __d("FacebarTokenizer",["TokenizeUtil"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a='[^"]';var g=["\\s's","'s",'"'+a+'*"?'],h=[[/\s+$/,""],[/\"\s+/,'"'],[/\s+\"/,'"'],[/\"\"/,""],[/^\"$/,""],[/\s+/," "]];c={tokenize:function(a,c){__p&&__p();var d=[],e=0;a=a.replace(/\s/g," ").toLowerCase();a.replace(new RegExp(g.join("|"),"g"),function(f,g){__p&&__p();if(g>e){var i=a.substr(e,g-e);Array.prototype.push.apply(d,b("TokenizeUtil").parse(i).tokens.slice(0))}i=f;for(var j=0;jb&&d.push({index:c,originalIndex:a.indexBeforeBuckets})});d.sort(function(a,b){return a.originalIndex-b.originalIndex}).slice(c).sort(function(a,b){return b.index-a.index}).forEach(function(b){a.splice(b.index,1)})};a.mergeBuckets=function(b,c){var d=[];for(var e in c)!c[e].rule.hidden&&(!c[e].rule.xor||!c[c[e].rule.xor])&&d.push(c[e]);d.sort(function(a,b){var c=(a.rule.position||0)-(b.rule.position||0);return c!==0?c:a.results[0].indexBeforeBuckets-b.results[0].indexBeforeBuckets});b.length=0;d.forEach(function(c,e){c.rule.maxPromotions!=null&&e=d)return!0;if(!!c.maxResults&&e[f].results.length>=c.maxResults)return!0;a.bucketLineage.push({bucketName:f,bucketIndex:e[f].results.length});e[f].results.push(a);return!0}.bind(this))}.bind(this));return e};c.$5=function(b,c,d){__p&&__p();c=this.$1[c];if(!c)return{};c=this.$4(b,c,d);for(var e in c){var f=c[e].rule.subBucketRules;f&&this.$5(c[e].results,f,d)}a.mergeBuckets(b,c);return c};c.$6=function(a,b,c){if(b.length<=c)return b.slice();a=b.map(function(a){return a.indexBeforeBuckets});var d=a.sort(function(a,b){return a-b})[c];return d==null?b:b.filter(function(a){return a.indexBeforeBucketsh)f(d,a,c);else{g=new(b("AsyncRequest"))();g.getData=function(){return i.requestData};h=new(b("AsyncResponse"))(g,i.payload);e(h,c)}},set:function(a,b,c){var d=a.getRequest().getData();this.getStorage().set(this.getKey(d,b,c),{timestamp:Date.now(),payload:a.payload,requestData:d})},getKey:function(a,b,c){return JSON.stringify({filter:a.filter,context:a.context,viewer:a.viewer,lazy:a.lazy,token:a.token,type:b.type,bootstrapEndpoint:c})},getStorage:function(){return new(b("CacheStorage"))("localstorage","_SearchBootstrapCache_"+g)}};e.exports=a}),null); __d("SearchSingleState",["fbt"],(function(a,b,c,d,e,f,g){__p&&__p();function h(a,b,c,d){return{classNames:"grammar",groupIndex:0,indexInGroup:a,path:b,text:c,type:"grammar",uid:d}}a={getSuggestions:function(a,b,c){if(c==="ent:user")return this.getSuggestionsForUser(a,b);else if(c==="ent:page")return this.getSuggestionsForPage(a,b);else if(c==="ent:app")return this.getSuggestionsForApp(a,b);else if(c==="ent:group")return this.getSuggestionsForGroup(a,b)},getSuggestionsForUser:function(a,b){return[h(0,"/search/"+a+"/photos-of",g._("photos of {full name}",[g._param("full name",b)]),"photos_of_user"),h(1,"/search/"+a+"/friends",g._("friends of {full name}",[g._param("full name",b)]),"friends_of_user"),h(2,"/search/"+a+"/pages-liked",g._("favorite pages of {full name}",[g._param("full name",b)]),"pages_liked_user"),h(3,"/search/str/"+b+"/users-named",g._("find all people named \"{full name}\"",[g._param("full name",b)]),"people_named_text")]},getSuggestionsForPage:function(a,b){return[h(0,"/search/"+a+"/photos-of",g._("photos of {name of page}",[g._param("name of page",b)]),"photos_of_page"),h(1,"/search/"+a+"/likers",g._("people who like {name of page}",[g._param("name of page",b)]),"page_likers"),h(2,"/search/str/"+b+"/pages-named",g._("find all pages named \"{name of page}\"",[g._param("name of page",b)]),"pages_named_text")]},getSuggestionsForGroup:function(a,b){return[h(0,"/search/"+a+"/members",g._("{name of group} members",[g._param("name of group",b)]),"members_of_group"),h(1,"/search/"+a+"/photos-in",g._("photos in {name of groups}",[g._param("name of groups",b)]),"photos_in_group"),h(2,"/search/"+a+"/creators",g._("{name of group} creators",[g._param("name of group",b)]),"creators_of_group"),h(3,"/search/"+a+"/admins",g._("{name of group} administrators",[g._param("name of group",b)]),"admins_of_group")]},getSuggestionsForApp:function(a,b){return[h(0,"/search/"+a+"/apps-similar-to",g._("apps similar to {name of app}",[g._param("name of app",b)]),"similar_apps"),h(1,"/search/"+a+"/app-users",g._("people who use {name of app}",[g._param("name of app",b)]),"app_users"),h(2,"/search/str/"+b+"/pages-named",g._("find all apps named \"{name of page}\"",[g._param("name of page",b)]),"apps_named_text")]}};e.exports=a}),null); __d("SearchDataSource",["Arbiter","AsyncResponse","CSRFGuard","CurrentUserInitialData","DataSource","Event","FacebarJSConstants","HashtagSearchResultUtils","PageTransitionsRegistrar","SearchBootstrapCache","SearchRegion","SearchSingleState","UnicodeCJK","XHRRequest","createArrayFromMixed","debounce"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=100,h="/typeahead/search/facebar/nullstate/";a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(b){__p&&__p();var c;b.headerflags=new Map();c=a.call(this,b)||this;c._updateMaxResults=function(){var a=window.innerHeight||document.documentElement.clientHeight;c.setMaxResults(Math.max(c._numResults.min,Math.min(c._numResults.max,Math.ceil(2+(a-370)/56))))};c._token=b.token||"";c._lazyonload=b.lazyonload!==!1;c._extraTypes=b.extraTypes;c._buckets=b.buckets;c._noMultiFetch=b.noMultiFetch||!1;c._nullStateConfig=b.nullStateConfig||{};var d=b.maxResults||8;c._numResults={min:3,max:d};c.recordingRoute=b.recordingRoute||"non_banzai";c._enabledHashtag=b.enabledHashtag||!1;c.logBackendQueriesWindow=b.logBackendQueriesWindow||25;c._genTime=b.genTime;c._bootstrapError=!1;c._hasKeywordBootstrap=b.hasKeywordBootstrap||!1;c._addJoinedTermsMatching=b.addJoinedTermsMatching||!1;c._useBootstrapCache=b.useBootstrapCache||!1;c._useBrowserCache=b.useBrowserCache||!1;c.cacheUnicodeMatch.setConfigs({prefix_hangul_conjoining_jamo:!0,prefix_kana_drop_trailing_latin:b.cjkDropLatinInCjTokens,prefix_kana_hiragana_to_katakana:b.cjkUiCacheHiraganaToKatakana,search_i18n_prefix_arabic_normalization:b.arabicNormalization});c.backendUnicodeMatch.setConfigs({prefix_kana_drop_trailing_latin:b.cjkDropLatinInCjTokens});return c}var d=c.prototype;d.init=function(){__p&&__p();a.prototype.init.call(this);this._leanPayload=null;this._bootstrapRequestsPending=0;this._criticalOnly=!0;this._updateMaxResults();var c=b("debounce")(this._updateMaxResults,g,this,!0);b("Event").listen(window,"resize",c);this._nullStateConfig.prefetchNullState&&this.fetchNullState("");this._nullStateConfig.singleState&&b("Arbiter").subscribe("page_transition",this.handlePageTransition.bind(this));(this._nullStateConfig.prefetchNullState||this._nullStateConfig.singleState)&&b("Arbiter").subscribe("search/updateNullState",this.updateNullState.bind(this));this._nullStateConfig.recent&&b("Arbiter").subscribe("search/refreshRecentSearchesNullstate",this.refreshRecentSearches.bind(this))};d.refreshRecentSearches=function(){this.nullStateData=null};d.handlePageTransition=function(){this.nullStateParams={}};d.updateNullState=function(a,b){this.nullStateParams=b,this.fetchNullState()};d.markResultsAsNullState=function(a){__p&&__p();if(a)for(var a=a,b=Array.isArray(a),c=0,a=b?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var d;if(b){if(c>=a.length)break;d=a[c++]}else{c=a.next();if(c.done)break;d=c.value}d=d;d.isNullState=!0}};d.markResultsAsSingleState=function(a){__p&&__p();if(a)for(var a=a,b=Array.isArray(a),c=0,a=b?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var d;if(b){if(c>=a.length)break;d=a[c++]}else{c=a.next();if(c.done)break;d=c.value}d=d;d.isSingleState=!0}};d.fetchNullState=function(a){this.lastNullOrSingleStateFetchStartTime=Date.now();if(!this._nullStateConfig.hasNullState)return;var b=null;this.nullStateParams&&this.nullStateParams.uid?(this.nullStateParams.query=a||"",b=this._fetchDataForSingleState(),this.markResultsAsNullState(b)):(b=this._fetchDataForNullState(),this.markResultsAsSingleState(b));b&&this.inform("respond",{value:this.nullStateParams?this.nullStateParams.query:"",results:b,isAsync:!1,nullState:!0})};d._fetchDataForSingleState=function(){__p&&__p();if(this.nullStateDataWithProfile&&this.nullStateParams.uid===this.nullStateDataWithProfile.profileID)return this.nullStateDataWithProfile.data;if(this.nullStateParams.type==="ent:app"||this.nullStateParams.type==="ent:group"||this.nullStateParams.type==="ent:page"){this.fetch(h,{profile_id:this.nullStateParams.uid,ent_type:this.nullStateParams.type},{singleState:!0});this.nullStateDataWithProfile={profileID:this.nullStateParams.uid};return}var a=b("SearchSingleState").getSuggestions(this.nullStateParams.uid,this.nullStateParams.text,this.nullStateParams.type);if(!a)return this._fetchDataForNullState();this.nullStateDataWithProfile={data:a,profileID:this.nullStateParams.uid};return a};d._shouldRefreshNullState=function(){if(!this._nullStateConfig.recent)return!1;var a=window.location.href;if(!a)return!1;return a.contains("allactivity")&&a.contains("log_filter=search")?!0:!1};d._fetchDataForNullState=function(){var a=this;if(this.nullStateData&&!this._shouldRefreshNullState()){this.markResultsAsNullState(this.nullStateData);window.setTimeout(function(){a.inform("respond",{value:"",results:a.nullStateData,isAsync:!0,nullState:!0})},0);return}this.fetchingNullState||(this.fetchingNullState=!0,this.fetch(h,{value:""},{nullState:!0,value:""}));return null};d.dirty=function(){a.prototype.dirty.call(this),this._bootstrapError=!1,this._fetchOnUseRequests=[]};d.asyncErrorHandler=function(a,b){b.nullState&&(this.fetchingNullState=!1),b.bootstrap&&(this._bootstrapError=!0),this.inform("fetchError",{response:a,fetch_context:b})};d.fetch=function(c,d,e){e=e||{};e.fetch_start=Date.now();var f=b("PageTransitionsRegistrar").getMostRecentURI().getPath();d=babelHelpers["extends"]({},d,{path:f});a.prototype.fetch.call(this,c,d,e)};d.xhrFetchHandler=function(a,c,d){a=b("CSRFGuard").clean(a);a=JSON.parse(a);return this.fetchHandler(new(b("AsyncResponse"))(null,a.payload),d,c)};d.fetchHandler=function(c,d,e){__p&&__p();e===void 0&&(e=null);if(d.nullState){this.fetchingNullState=!1;this.nullStateData=c.getPayload().entries;this.markResultsAsNullState(this.nullStateData);this.inform("respond",{value:"",results:this.nullStateData,isAsync:!0,nullState:!0});return}if(d.singleState){this.nullStateDataWithProfile.data=c.getPayload().entries;this.markResultsAsSingleState(this.nullStateDataWithProfile.data);this.inform("respond",{results:this.nullStateDataWithProfile.data,isAsync:!0,value:this.nullStateParams?this.nullStateParams.query:"",nullState:!0});return}var f=c.getPayload(),g=babelHelpers["extends"]({fetch_end:Date.now()},d),h=g.value?"event":"persistent";this.inform("beginFetchHandler",{response:c});d.bootstrap&&(this._bootstrapError=!1);var i=e===null?c.getRequest().uri.getPath():e.getURI().getPath();i===this.bootstrapEndpoint&&this._useBootstrapCache&&b("SearchBootstrapCache").set(c,d,this.bootstrapEndpoint);if(d.type=="lean")this._leanPayload=f,this._processLean();else{f.coeff2_ts&&(g.coeff2_ts=f.coeff2_ts);a.prototype.fetchHandler.call(this,c,d);i=e===null?c.getRequest().getData():e.getData();d.bootstrap&&!i.no_cache&&(g.browserCacheHit=f.timestamp0&&(d.bootstrap=!1,--this._bootstrapRequestsPending,this._bootstrapRequestsPending||this._bootstrapPostProcess());if(f.no_data||f.stale||f.token!==this._token){e=babelHelpers["extends"]({},i);e.lazy&&(delete e.lazy,e.token=this._token,this._fetchOnUse(e,d))}}this.inform("endpointStats",{info:g,response:c},h);d&&!!d.value&&this.inform("completeFetch",{response:c,stats:g})};d.respond=function(a,b,c){this.inform("respondValidUids",b);this.inform("reorderResults",b);b=this.buildData(b,a);b.forEach(function(a,b){a.origIndex=b,a.fromCache=!c});this.inform("respond",{value:a,results:b,isAsync:!!c});return b};d.buildData=function(a,b){if(!a||a.length===0)return[];b=a.map(this.getEntry,this);b.length=Math.min(b.length,this._maxResults);return b};d.fetchLean=function(){this._fetchLean()};d._isQueryTooShort=function(a){return a.length0&&this._bootstrapFetch("keyword",{filter:c})}this._fetchLean();this._bootstrapped=!0};d.getBootstrapError=function(){return this._bootstrapError};d._flushFetchOnUseRequests=function(){var a=this._fetchOnUseRequests.length;for(var b=0;b0&&this.inform("extra_bootstrap",{time:Date.now()},"persistent");this._fetchOnUseRequests=[]};d.onLoad=function(a,b){this.inform("onload",{time:Date.now()},"persistent"),a&&window.setTimeout(this.bootstrap.bind(this,b),0)};d.mergeUids=function(b,c,d,e){__p&&__p();var f=this.getDynamicHashtagResult(e);e&&f&&c.indexOf(f)<=0&&c.unshift(f);f=d[0]?this.getEntry(d[0]):null;var g=c[0]?this.getEntry(c[0]):null;f=f&&f.replace_results?f:null;f=!f&&g&&g.replace_results?g:f;g=a.prototype.mergeUids.call(this,b,c,d,e);if(f){this.inform("backend_topreplace",{});return this.deduplicateByKey([f.uid].concat(g))}return g};d.getTextToIndexFromFields=function(a,b){var c=[],d=a.tokenVersion==="v2";for(var e=0;e0&&a.value.startsWith("@")&&(b[0]="@"+b[0]);return a};return c}(b("DataSource"));e.exports=a}),null); __d("FacebarDataSource",["invariant","Arbiter","AsyncRequest","CurrentUser","FacebarGlobalOptions","FacebarGSv2Echo","FacebarInviteCoworkers","FacebarJSConstants","FacebarKeywordSearchUtils","FacebarResultStore","FacebarResultStoreUtils","FacebarSearchAllMessages","FacebarStructuredText","FacebarTimerUtils","FacebarTokenizer","FacebarURI","ResultsBucketizer","ResultsBucketizerConfig","SearchDataSource","URI","Vector","ViewportBounds","WorkGalahadNavStore","emptyFunction","gkx","queryThenMutateDOM","throttle"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=50,i=13,j={};a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.executeQuery=function(a,c,e){__p&&__p();d._useCustomQueryId!==!0&&d._curQueryId++;e!=null&&(e.queryId=d._curQueryId,e.startCacheQuery=b("FacebarTimerUtils").getTimestamp());var f=d.getMaxResults(),g=b("CurrentUser").isWorkUser()&&b("WorkGalahadNavStore").getSelectedAppTabID()==="chats";d.setQueryData({qid:d._curQueryId,max_results:f,galahad_chat_tab:g});d.inform("beforeQuery",{value:a,queryId:d._curQueryId});d.value=a;f=d.buildUids(a,[]);e!=null&&(e.endCacheQuery=b("FacebarTimerUtils").getTimestamp());c&&f.length===0&&f.push(c);d.inform("query",{value:a,results:f,queryId:d._curQueryId});d.resultStore&&d.respond(a,f,!1,!1,e)};d.sendRemoteQuery=function(a,c,e){__p&&__p();var f=d.getQueryData(a.text_form),g=e!=null?e.queryId:0;f=new(b("AsyncRequest"))().setURI(d.queryEndpoint).setData(f).setMethod("GET").setReadOnly(!0).setAllowCrossPageTransition(!0).setHandler(function(b,d){this.handleQueryResponse(d,b,a,c,e)}.bind(babelHelpers.assertThisInitialized(d),g)).setFinallyHandler(function(){d.activityEnd()});for(var h=d._headerflags,i=Array.isArray(h),j=0,h=i?h:h[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var k;if(i){if(j>=h.length)break;k=h[j++]}else{j=h.next();if(j.done)break;k=j.value}k=k;var l=k[0];k=k[1];f.setRequestHeader(l,k)}d.inform("sending_request",f);d._maxRemoteQueryId=g;e!=null&&(e.waitingQueries=d._waitingQueries,e.inflightRequests=b("AsyncRequest").getInflightCount(),e.startRemoteQuery=b("FacebarTimerUtils").getTimestamp());f.send();d.activityStart()};d.renderResults=function(a,c,e,f,g){g!=null?j[String(a)]=g:g=j[String(a)];b("FacebarGSv2Echo").insertInto(a,c,!e,d._single_state,d._is_local,d._categoryName);!!a&&a instanceof b("FacebarStructuredText")&&!a.isEmptyOrWhitespace()&&!d._bypassBucketizer&&(c=d._bucketizeResults(a,c,g));g=c.length>0&&c[0].isNullState;g=g?d.getNullstateMaxResults():d.getMaxResults();c.length=Math.min(c.length,g);d.injectExtraResults(a,c);f=e&&c.length===0;d.inform("respond",{value:a,results:c,isAsync:!!e,isEmptyResults:f})};d._fetched_null_state=null;d._initialQueryData=null;d._curQueryId=-1;d._maxRemoteQueryId=-1;d._single_state=!1;d._is_local=!1;d._categoryName=null;d._waitingQueries=0;d.mixGrammarAndEntity=c.mixGrammarAndEntity!==void 0?c.mixGrammarAndEntity:!0;d._isInjectedSuggestionFlow=!1;d._useCustomQueryId=!1;d.grammarVersion=c.grammarVersion||"";c.grammarOptions||(c.grammarOptions={});d._headerflags=c.headerflags||new Map();d.recordingRoute="banzai_vital";d._maxGrammarResults=c.grammarOptions.maxGrammarResults;d.nullStateEndpoint=c.nullStateEndpoint||"/ajax/browse/null_state.php";d.setNullStateData(c.nullStateData||{},!0);d._minQueryLength=c.minQueryLength||-1;d._performShortQuery=c.performShortQuery||!1;d._fixProcessLean=c.grammarOptions.fixProcessLean||!1;d.throttleExecuteQuery();d.throttleSendRemoteQuery();d.throttleRenderResults();d.resultStoreOptions=c.grammarOptions||{};d.resultStoreOptions.useNewExactNameMatch=c.grammarOptions.useNewExactNameMatch==="true";d.defaultQuery=null;d._bypassBucketizer=!1;d._resultsBucketizer=new(b("ResultsBucketizer"))(b("ResultsBucketizerConfig").rules,function(a,b){switch(b){case"isSeeMore":return a.isSeeMore;case"objectType":return a.type;case"resultSetType":return a.results_set_type;case"renderType":return a.render_type||a.type;case"cacheOnlyResult":return a.cacheOnlyResult;case"closeEntity":return a.bootstrapped||(a.tags?a.tags[b]:void 0);default:return a.tags?a.tags[b]:void 0}});d.fetchNullState();d.initWithConfig(b("FacebarGlobalOptions").grammarConfig);d.subscribe("bootstrapped",function(){b("Arbiter").subscribe("FacebarDataSource.getBootstrapMatches",function(b,a){a.callback.call(null,d.getBootstrapMatches(a.query,a.whitelistedEntIds))})});return d}var d=c.prototype;d.initWithConfig=function(a){this.facebarConfig=a,this.createResultStore(),this._fetched_null_state&&(this.setNullState(this._fetched_null_state),this._fetched_null_state=null)};d.throttleExecuteQuery=function(){var a=b("FacebarGlobalOptions").executeQueryThrottleTime;this.executeQueryThrottled=b("throttle").withBlocking(this.executeQuery,a,this)};d.throttleSendRemoteQuery=function(){var a=b("FacebarGlobalOptions").sendRemoteQueryThrottleTime;a===0?this.sendRemoteQueryThrottled=this.sendRemoteQuery:this.sendRemoteQueryThrottled=b("throttle").withBlocking(this.sendRemoteQuery,a,this)};d.throttleRenderResults=function(){var a=this,c=b("FacebarGlobalOptions").renderThrottleTime;if(c===0){this.renderResultsThrottled=this.renderResults;return}var d=Date.now();this.renderResultsThrottled=function(b,e,f,g,h){var i=Date.now();(f||d+c0?b.original_category.split(" \xb7 "):[];d.unshift.apply(d,f);d=d.filter(function(a,b,c){return b==c.indexOf(a)});b.category=d.splice(0,2).join(" \xb7 ")};d.getRawStructure=function(a){typeof a==="string"&&(a=b("FacebarStructuredText").fromString(a));if(this.resultStore)return this.resultStore.transformStructured(a.toArray())};d.saveResult=function(a){this._initialQueryData=this.getUID(a.uid,a.fetchType)};d.isDefaultKeywordQuery=function(a){return a.type===b("FacebarJSConstants").keywordType&&b("FacebarResultStoreUtils").getTextFromResult(a).toLowerCase()===this.value.getHash().trim().toLowerCase()};d.buildUids=function(a){__p&&__p();var c=this;if(!a||!this.resultStore)return[];typeof a==="string"&&(a=b("FacebarStructuredText").fromString(a));var d=this.getRawStructure(a);a=this.resultStore.getResults(d,this.getMaxResults());var e=a.results;if(e===void 0)return[];a=a.null_state===!0;var f=0;e=e.filter(function(a,c){return!b("FacebarGlobalOptions").allowGrammar&&a.type=="grammar"?!1:a.semantic!=""&&(a.type!="unimplemented"||f++===0)},this);var g=[],h=[],i=[];e.forEach(function(a){a.forcedPosition>0?i.push(a):a.isSeeMore?g.push(a):h.push(a)});a?e=this.orderNullState(e,this.getNullstateMaxResults()):e=h;i.length>0&&(i.sort(function(a,b){return a.forcedPosition-b.forcedPosition}),i.forEach(function(a){e.splice(a.forcedPosition,0,a)}));g.length>0&&e.push.apply(e,g);return e.map(function(a){return c.toTypeaheadEntryUid(d,a)})};d.orderNullState=function(a,b){var c={top:[],bottom:[],middle:[]},d=function(a){a=a.null_state_position;return Object.prototype.hasOwnProperty.call(c,a)?a:"middle"},e=function(a,b){return a.original_cost-b.original_cost};a&&a.forEach(function(a){c[d(a)].push(a)},this);for(var f in c)c[f]=c[f].sort(e).slice(0,b),b-=c[f].length;return[].concat(c.top,c.middle,c.bottom)};d.isEntity=function(a){return!a?!1:/^\d+$/.test(a)};d.handleResponse=function(a,b){var c=this;a.payload.errors||(this.processEntries(a.payload.entities),a.payload.results.forEach(function(d){d.qid=a.queryId,d.parse||(d.parse={}),d.parse.entTokens=d.parse.entTokens||[],d.parse.remTokens=d.parse.remTokens||[],d.parse.suffix=d.parse.suffix||"",c.isEntity(d.semantic)&&(d=c._buildCommonEntityFields(d,b.tokens))}),this.saveResults(a,b))};d.saveResults=function(a,b){a.payload.prefetched&&this.processPrefetched(a.payload.prefetched),this.resultStore.saveResults(a.payload.results,b,a.payload.incomplete,{},[])};d.processPrefetched=function(a){var c=this,d=function(d){var e=b("FacebarStructuredText").fromString(d),f=c.getRawStructure(e);e=a[d];c.processEntries(e.entities);e.results.forEach(function(a){c.isEntity(a.semantic)&&(a=c._buildCommonEntityFields(a,f.tokens))});c.resultStore.saveResults(e.results,f,e.incomplete)};for(var e in a)d(e)};d.processEntries=function(a){__p&&__p();return a.map(function(a,b){__p&&__p();var c=a.uid+="";a.textToIndex=this.getTitleTerms(a);a.titleToIndex=this.getTitleTerms(a);c=this.getUID(c,a.fetchType);var d=this.getEntry(c);!d?(this.setEntry(c,{}),d=this.getEntry(c)):delete a.photo;Object.assign(d,a);d.tuid=c;d.index===void 0&&(d.index=b);return c},this)};d.getUID=function(a,b){a+="";if(b!==void 0){b=/([^:]+:)?([^:]+)(:.*)?/.exec(b)[2];return JSON.stringify([a,b])}return a};d.getEntry=function(b,c){b=""+b;c=c!=null?a.prototype.getEntry.call(this,this.getUID(b,c))||a.prototype.getEntry.call(this,b):a.prototype.getEntry.call(this,b);return c};d.getEntryForFragment=function(a){return this.getEntry(a.getUID(),a.getTypePart(2))};d.getMaxResults=function(){return this._numResults.max};d.getNullstateMaxResults=function(){if(b("gkx")("1051462"))return i;else return this.getMaxResults()};d.query=function(a,c,d){this.executeQueryThrottled(a,this._initialQueryData,{keyPress:b("FacebarTimerUtils").getTimestamp()}),this._initialQueryData=null};d.setCustomQueryID=function(a){this._customQueryID=a};d.shouldFetchMore=function(a,c){__p&&__p();if(!a.is_empty&&!b("CurrentUser").isWorkUser()){var d=c.filter(function(a){return a.type===b("FacebarJSConstants").keywordType}).length;if(dc||!a.nextSibling)if(b("isTextNode")(a)||!d)return{node:a,offset:Math.min(c,e)};else return h.getMarker(a,c);else c-=e;a=a.nextSibling}}};e.exports=h}),null); __d("StructuredInputUtil",["StructuredInputDOM"],(function(a,b,c,d,e,f){__p&&__p();function g(a,b,c){a=a.substr(0,b).lastIndexOf(c);return a!==-1?a+1:0}function h(a,b,c){c=a.indexOf(c,b);return c!==-1?c:a.length}function i(a,b,c){return b===0||b===a.length||a.substr(b,c.length)==c}function j(a,b,c,d){switch(b){case"none":return c;case"all":return d?a.length:0;case"word":if(i(a,c,"\xa0"))return c;else if(d)return h(a,c,"\xa0");else return g(a,c,"\xa0")}}function k(a,c){return c&&b("StructuredInputDOM").isEntityNode(a)&&!b("StructuredInputDOM").isEntityNode(c)}var l={getMarkerAtOffset:function(a,c){var d=a.firstChild,e=0,f=0;while(d){e+=f;f=b("StructuredInputDOM").getLength(d);if(e+f>c)break;else d=d.nextSibling}return{node:d||a.lastChild,offset:c-e}},validateEntityText:function(a){__p&&__p();var c=b("StructuredInputDOM").getText(a),d=a.getAttribute("data-fulltext");a=a.getAttribute("data-group");if(a=="hashtag"){var e=c.match(/#[^\s]+/);d=e&&e[0]}e=c.indexOf(d);var f={prefix:null,entity:null,suffix:null};switch(a){case"none":f.entity=c;break;case"hashtag":case"all":e!=-1?(f.prefix=c.substr(0,e),f.entity=c.substr(e,d.length),f.suffix=c.substr(e+d.length)):f.suffix=c;break;case"word":e!=-1&&(f.prefix=c.substr(0,e),c=c.substr(e));a=0;e=0;while(a0};return function(c){if(c.length!=1||!a(c[0])){var d=c.map(b("StructuredInputDOM").getText).join("").replace(/\s+/g," ");return d?[this._createTextNode(d)]:[]}else{c[0].style.cssText="";return}}}()});e.exports=a}),null); __d("DOMSelection",[],(function(a,b,c,d,e,f){__p&&__p();(function(){__p&&__p();var a=this,b={isPreceding:function(a,b){return b.compareDocumentPosition(a)&2},contains:function(a,b){if(a.compareDocumentPosition!=null)return a.compareDocumentPosition(b)&16;else return a.contains(b)},isCursorPreceding:function(a,c,d,e){__p&&__p();if(a===d)return c<=e;if(b.isText(a)&&b.isText(d))return b.isPreceding(a,d);if(b.isText(a)&&!b.isText(d))return!b.isCursorPreceding(d,e,a,c);if(!b.contains(a,d))return b.isPreceding(a,d);if(a.childNodes.length<=c)return!1;return a.childNodes[c]===d?0<=e:b.isPreceding(a.childNodes[c],d)},isText:function(a){return a!=null?a.nodeType==3:!1},getChildIndex:function(a){var b=0;while(a=a.previousSibling)b++;return b}},c=a.Selection=function(){__p&&__p();function a(a){this.win=a}a.prototype.hasSelection=function(){return a.hasSelection(this.win)};a.prototype.isBidirectional=function(){return a.isBidirectional(this.win)};a.prototype.getOrigin=function(){return a.getOrigin(this.win)};a.prototype.getFocus=function(){return a.getFocus(this.win)};a.prototype.getStart=function(){return a.getStart(this.win)};a.prototype.getEnd=function(){return a.getEnd(this.win)};a.prototype.trySelection=function(b,c,d,e){return a.trySelection(this.win,b,c,d,e)};a.prototype.setSelection=function(b,c,d,e){return a.setSelection(this.win,b,c,d,e)};a.prototype.clearSelection=function(){return a.clearSelection(this.win)};return a}();function d(){if(a.document.selection&&/MSIE 9\./.test(navigator.userAgent))return!1;else return!!a.getSelection}if(d()){c.supported=!0;c.hasSelection=function(a){return(a=a.getSelection())&&a.focusNode!=null&&a.anchorNode!=null};c.isBidirectional=function(a){return!0};c.getOrigin=function(a){return!((a=a.getSelection())&&a.anchorNode!=null)?null:[a.anchorNode,a.anchorOffset]};c.getFocus=function(a){return!((a=a.getSelection())&&a.focusNode!=null)?null:[a.focusNode,a.focusOffset]};c.getStart=function(a){var d,e,f;if(!c.hasSelection(a))return null;f=c.getOrigin(a),d=f[0],f=f[1];a=c.getFocus(a),e=a[0],a=a[1];return b.isCursorPreceding(d,f,e,a)?[d,f]:[e,a]};c.getEnd=function(a){var d,e,f;if(!c.hasSelection(a))return null;f=c.getOrigin(a),d=f[0],f=f[1];a=c.getFocus(a),e=a[0],a=a[1];return b.isCursorPreceding(d,f,e,a)?[e,a]:[d,f]};d=function(a,b,d,e,f,g){__p&&__p();var h=b.getSelection();if(!h)return;f==null&&(f=d);g==null&&(g=e);if(h.collapse&&h.extend)h.collapse(d,e),h.extend(f,g);else{r=b.document.createRange();r.setStart(d,e);r.setEnd(f,g);if(a||!c.hasSelection(b)||r.endContainer===f&&r.endOffset===g&&r.startContainer===d&&r.startOffset===e){try{h.removeAllRanges()}catch(a){}h.addRange(r)}}};c.setSelection=d.bind(c,!0);c.trySelection=d.bind(c,!1);c.clearSelection=function(a){try{a=a.getSelection();if(!a)return;a.removeAllRanges()}catch(a){}};c.getText=function(a){a=a.getSelection();if(!a)return;return a.toString()}}else if(a.document.selection){var e=function(a,c,d){__p&&__p();var e,f;a=a.createElement("a");e=c.duplicate();e.collapse(d);f=e.parentElement();while(!0){f.insertBefore(a,a.previousSibling);e.moveToElementText(a);if(!(e.compareEndPoints(d?"StartToStart":"StartToEnd",c)>0&&a.previousSibling!=null))break}e.compareEndPoints(d?"StartToStart":"StartToEnd",c)===-1&&a.nextSibling?(e.setEndPoint(d?"EndToStart":"EndToEnd",c),f=a.nextSibling,d=e.text.length):(f=a.parentNode,d=b.getChildIndex(a));a.parentNode.removeChild(a);return[f,d]},f=function(a,c,d,e,f){__p&&__p();var g,h,i;i=0;g=b.isText(e)?e:e.childNodes[f];h=b.isText(e)?e.parentNode:e;b.isText(e)&&(i=f);e=a.createElement("a");h.insertBefore(e,g||null);f=a.body.createTextRange();f.moveToElementText(e);e.parentNode.removeChild(e);c.setEndPoint(d?"StartToStart":"EndToEnd",f);return c[d?"moveStart":"moveEnd"]("character",i)};c.supported=!0;c.hasSelection=function(a){var b;if(!a.document.selection)return!1;b=a.document.selection.createRange();return b&&b.parentElement().document===a.document};c.getStart=function(a){var b;if(!c.hasSelection(a))return null;b=a.document.selection.createRange();return e(a.document,b,!0)};c.getEnd=function(a){var b;if(!c.hasSelection(a))return null;b=a.document.selection.createRange();return e(a.document,b,!1)};c.isBidirectional=function(a){return!1};c.getOrigin=function(a){return c.getStart(a)};c.getFocus=function(a){return c.getEnd(a)};d=function(a,b,c,d,e,g){e==null&&(e=c);g==null&&(g=d);a=b.document.body.createTextRange();f(b.document,a,!1,e,g);f(b.document,a,!0,c,d);return a.select()};c.setSelection=d.bind(c,!0);c.trySelection=d.bind(c,!1);c.clearSelection=function(a){return a.document.selection.empty()};c.getText=function(a){if(!c.hasSelection(a))return null;a=a.document.selection.createRange();return a&&a.text}}else c.supported=!1}).call(this),e.exports=Selection}),null); __d("StructuredInputSelection",["DOM","DOMSelection","Scroll","StructuredInputDOM","StructuredInputUtil","Vector"],(function(a,b,c,d,e,f){__p&&__p();a=function(){"use strict";__p&&__p();function a(a){var b=a.ownerDocument;this.window=b.defaultView||b.parentWindow;this.root=a;this.selection=!1;this.start=new g(this,[]);this.end=new g(this,[]);this.update()}var c=a.prototype;c.isSupported=function(){return!!(b("DOMSelection")&&b("DOMSelection").hasSelection)};c.update=function(){this.selection=!1;if(this.isSupported()&&this.root==document.activeElement&&b("DOMSelection").hasSelection(this.window)){var a=b("DOMSelection").getStart(this.window),c=b("DOMSelection").getEnd(this.window),d=b("DOMSelection").getFocus(this.window);this.start=this.makeMarker(a);this.end=this.makeMarker(c);this.backward=a[0]==d[0]&&a[1]==d[1];this.selection=this.start.node&&this.end.node}};c.makeMarker=function(a){if(a[0]===this.root)return new g(this,[this.root.childNodes[a[1]],0]);else return new g(this,a)};c.getFocus=function(){return this.backward?this.start:this.end};c.getOrigin=function(){return this.backward?this.end:this.start};c.move=function(a){if(this.selection){this.start.move(a);this.start.snap();this.end.setPosition(this.start);return this.apply()}};c.expand=function(a){if(this.selection){b("DOMSelection").isBidirectional()&&(this.start.move(!a),this.start.snap(),this.end.move(a),this.end.snap());return this.apply()}};c.getText=function(){if(this.selection&&this.isSupported()){var a=b("DOMSelection").getText(this.window);return a}};c.getOffset=function(){if(this.selection)return this.start.rootOffset};c.getLength=function(){return(this.getText()||"").length};c.setPosition=function(a,c){this.backward=!1;this.selection=!0;this.start.setPosition(b("StructuredInputUtil").getMarkerAtOffset(this.root,a));this.start.snap();c>0?(this.end.setPosition(b("StructuredInputUtil").getMarkerAtOffset(this.root,a+c)),this.end.snap()):this.end.setPosition(this.start);return this.apply()};c.hasRange=function(){return this.selection&&(this.start.node!=this.end.node||this.start.offset!=this.end.offset)};c.scrollToFocus=function(){var a=5,c=this.getFocus();if(c.node){var d=b("Vector").getElementDimensions(this.root).x,e=b("Scroll").getLeft(this.root);c=c.node.offsetLeft+c.node.offsetWidth;c-ed-a&&b("Scroll").setLeft(this.root,c-d+a)}};c.apply=function(){__p&&__p();if(this.start.hasChanged()||this.end.hasChanged()){var a=this.getOrigin().getMarker(!0),c=this.getFocus().getMarker(!0);this.selection=this.selection&&a&&a.node&&c&&c.node;if(this.selection&&this.isSupported()){this.start.changed=!1;this.end.changed=!1;b("DOMSelection").trySelection(this.window,a.node,a.offset,c.node,c.offset);return!0}}};c.markDirty=function(a){b("DOM").contains(a,this.start.node,a)&&(this.start.changed=!0),b("DOM").contains(a,this.end.node,a)&&(this.end.changed=!0)};return a}();var g=function(){"use strict";__p&&__p();function a(a,b){this.selection=a,this.node=b[0],this.offset=b[1],this.rootOffset=this.getRootOffset(b[0],b[1]),this.sibling=this.node&&this.node.previousSibling,this.changed=!1}var c=a.prototype;c.hasChanged=function(){return this.changed||!this.isNodeValid()};c.isNodeValid=function(){if(b("StructuredInputDOM").getLength(this.node)>this.offset){var a=this.node;while(a=a.parentNode)if(a==this.selection.root)return!0}};c.getMarker=function(a){if(this.isNodeValid()&&(a&&!this.node.firstChild||!a&&this.node.parentNode==this.selection.root))return this;else return b("StructuredInputDOM").getMarker(this.selection.root,this.rootOffset,a)};c.move=function(a){this.node&&this.setPosition(b("StructuredInputUtil").nextMarkerBoundary(this.getMarker(!1),a,"select"))};c.snap=function(){this.node&&this.setPosition(b("StructuredInputUtil").snapMarkerToText(this.getMarker(!1),"select"))};c.setPosition=function(a){(a.offset!=this.offset||a.node!=this.node)&&(this.changed=!0,this.node=a.node,this.offset=a.offset,this.rootOffset=this.getRootOffset(this.node,this.offset))};c.getRootOffset=function(a,c){var d=0,e=5;while(a&&d++0||a.offset===0)return!1;a=this.getSelection().offset-1;a=b("StructuredInputUtil").getMarkerAtOffset(this._richInput,a);if(a&&b("StructuredInputDOM").isEntityNode(a.node)&&b("StructuredInputUtil").getGrouping(a.node,"select")!=="none"){b("DOM").remove(a.node);return!0}return!1};d._selectionIsText=function(){var a=this._selection.start.node,c=this._selection.end.node;return a&&a===c&&!b("StructuredInputDOM").isEntityNode(a)&&!b("StructuredInputDOM").isEntityNode(a.parentNode)};d._insertText=function(a){if(a){a=b("DOM").create("div",{},a);return this._insertNodes(a)}};d._insertHTML=function(a){if(a){var c=b("DOM").create("div"),d=new(b("StructuredInputCleaner"))(c,null,!1);c.innerHTML=a;d.clean();return this._insertNodes(c)}};d._insertNodes=function(a){document.selection?document.selection.createRange().pasteHTML(a.innerHTML):document.execCommand("insertHTML",!1,a.innerHTML),this._richChanged=!0,this.cleanInput()};d.togglePlaceholder=function(a){if(!this._placeholderText)return;var c=b("StructuredInputDOM").getLength(this._richInput)===0;a&&c?b("CSS").show(this._placeholderText):b("CSS").conditionShow(this._placeholderText,c&&!this._imeMode)};d._toggleHint=function(){__p&&__p();var a=b("createArrayFromMixed")(this._hintNodes),c=null,d="",e=b("StructuredInputDOM").getText(this._richInput).toLowerCase();if(!this.hasFocus())return;if(this._contentOverflows()){b("CSS").hide(this._hintText);return}while(a.length&&d.lengththis._richWidth};d._forceTop=function(){this._multiline||b("Scroll").setTop(this._richInput,0),b("Scroll").setTop(this._root,0)};d._createStructureNodes=function(a){return a.map(function(a){return a.uid||a.type&&a.type!="text"?b("StructuredInputDOM").createEntityNode(a,a.display||{}):b("StructuredInputDOM").createTextNode(a.text)}.bind(this))};d._suppressInput=function(){__p&&__p();if(o||p){if(this._richClean)return;this._richClean=this._richInput.cloneNode(!0);this._richClean.contentEditable=!1;this._root.insertBefore(this._richClean,this._richInput.nextSibling);b("Scroll").setLeft(this._richClean,b("Scroll").getLeft(this._richInput));b("Style").set(this._richInput,"padding",0);b("Style").set(this._richInput,"height",0)}};d._revealInput=function(){if(!this._richClean)return;b("Style").set(this._richInput,"height","");b("Style").set(this._richInput,"padding","");this._root.removeChild(this._richClean);this.focus();this._richClean=null};d._cleanInput=function(){__p&&__p();var a;this._textChanged&&!this._richChanged?(this._selection.update(),a="change"):(this._richChanged||this._selectionChanged)&&(this._selection.update(),this._richChanged&&(this._contentWidth=null,this._cleaner.clean(),this._cleaner.endOnText(),this._selection.apply(),a="change"),this._selectionChanged&&(this._cleanSelection(),(this._selectionLength||!this._richChanged)&&(a="select")));this._revealInput();this._forceTop();this._cleanInputPreTogglesFinished=!0;(this._richChanged||this._textChanged)&&(this.togglePlaceholder(),this._toggleHint());this._selectionIgnore=!0;this._selectionChanged=!1;this._richChanged=!1;this._textChanged=!1;this._cleanInputFinished=!0;a&&this.inform(a)};d._cleanSelection=function(){var a=this._selection.getLength(),b=this._selection.getOffset();a&&(this._selection.expand(a>=this._selectionLength),a=this._selection.getLength(),b=this._selection.getOffset());this._selectionLength=a;this._selectionOffset=b};d.cleanInput=function(){this._scheduledCleanInput||this._cleanInput()};d.scheduleCleanInput=function(a){var c=this;a&&this._suppressInput();this._scheduledCleanInput||(this._scheduledCleanInput=!0,b("setTimeoutAcrossTransitions")(function(){c._cleanInput(),c._scheduledCleanInput=!1},0))};d.setEnabled=function(a){this._textInput.disabled=!a,this._richInput.contentEditable=a};d.getRoot=function(){return this._root};d.getRichInput=function(){return this._richInput};d.getEnabled=function(){return!this._textInput.disabled};d.getText=function(){return b("StructuredInputDOM").getDecodedText(this._richInput)};d.setText=function(a){b("DOM").setContent(this._richInput,b("StructuredInputDOM").createTextNode(a)),this._richChanged=!1,this._selectionChanged=!1,this.inform("change")};d.setHint=function(a){this._hintNodes=this._createStructureNodes(a),this._toggleHint()};d.getStructure=function(){var a=[];Array.from(this._richInput.childNodes).forEach(function(c){var d=!b("isTextNode")(c),e=b("StructuredInputDOM").getDecodedText(c);e.length&&a.push({text:e,uid:d?c.getAttribute("data-uid"):null,type:d&&c.getAttribute("data-type")||"text",isLocal:d&&c.getAttribute("data-is-local"),categoryName:d?c.getAttribute("data-category-name"):null})});return a};d.setStructure=function(a){b("DOM").setContent(this._richInput,this._createStructureNodes(a)),this._cleaner.clean(),this._cleaner.endOnText(),this.togglePlaceholder(),this._toggleHint(),this._richChanged=!1,this._selectionChanged=!1,this.inform("change")};d.getContentDimensions=function(){var a=this._richInput.lastChild;return{width:a?a.offsetLeft+a.offsetWidth:0,height:a?a.offsetTop+a.offsetHeight:0}};d.getSelection=function(){if(this._selection)return{offset:this._selection.getOffset(),length:this._selection.getLength()}};d.setSelection=function(a){this.hasFocus()&&this._selection&&(this._selection.update(),this._selection.setPosition(a.offset,a.length),this._selection.scrollToFocus(),this._selectionChanged=!1,this.inform("select"))};d.moveSelectionToEnd=function(){this.setSelection({length:0,offset:b("StructuredInputDOM").getLength(this._richInput)})};d.isSelectionAtEnd=function(){var a=this.getSelection().offset,c=b("StructuredInputDOM").getLength(this._richInput);return a>=c};d.selectAll=function(){this.setSelection({offset:0,length:b("StructuredInputDOM").getLength(this._richInput)})};d.hasFocus=function(){return b("DOM").contains(this._root,document.activeElement)};d.focus=function(){this._richInput.focus()};d.blur=function(){var a={position:"absolute",top:0,width:"1px",height:"1px"};b("Locale").isRTL()?a.right="-100px":a.left="-100px";var c=b("DOM").create("input",{type:"text",tabIndex:-1,style:a});b("DOM").appendContent(this._root,c);a=function(){(this.hasFocus()||q&&document.activeElement===document.body)&&(c.focus(),c.blur())};this.blur=a;this.blur()};return a}(b("mixin")(b("ArbiterMixin")));r.getInstance=function(a){var c=b("Parent").bySelector(a,"._586g");if(!c)throw new Error("No DOMElement structured input found using "+a);return b("DataStore").get(c,"StructuredInput")||new r(c)};e.exports=r}),null); __d("FacebarTypeaheadInput",["csx","ArbiterMixin","DOM","FacebarStructuredText","Locale","SimpleStructuredInput","StructuredInput","mixin"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h={text:{className:"text",group:"all",select:"none"},ent:{className:"entity",group:"all",select:"group"},"ent:hashtag_exact":{className:"entity",group:"hashtag",select:"none"}};function i(a){return Object.assign(a.toStruct(),{display:h[a.getType()]||h[a.getTypePart(0)]})}a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this)||this;d.root=c;var e=b("DOM").scry(d.root,"._586i")[0];e?d.input=b("StructuredInput").getInstance(c):d.input=b("SimpleStructuredInput").getInstance(c);d.value=null;d.selection={offset:0,length:0};d.resetOnChange=!0;d.initEvents();return d}var d=c.prototype;d.initEvents=function(){var a=function(a,b){this.inform(a,b)}.bind(this);this.input.subscribe("blur",a);this.input.subscribe("focus",a);this.input.subscribe("change",function(a,b){this.resetOnChange&&(this.value=null),this.inform("change",b)}.bind(this))};d.togglePlaceholder=function(a){return this.input instanceof b("StructuredInput")?this.input.togglePlaceholder(a):null};d.focus=function(){this.input.focus()};d.blur=function(){this.input.blur()};d.getElement=function(){return this.root};d.getRawInputElement=function(){var a=b("DOM").scry(this.root,"._586i")[0];return a==null?b("DOM").scry(this.root,"._1frb")[0]:a};d.getValue=function(){this.value==null&&(this.value=b("FacebarStructuredText").fromStruct(this.input.getStructure()));return this.value};d.getLength=function(){return this.getValue().getLength()};d.resetPlaceholder=function(){this.input.resetPlaceholder()};d.setValue=function(a,b){this.value=a;this.resetOnChange=!!b;b=a.toArray().map(i);this.input.setStructure(b);this.input.setSelection({offset:a.getLength(),length:0});this.resetOnChange=!0};d.storeSelection=function(){this.selection=this.input.getSelection()};d.restoreSelection=function(){this.selection&&this.input.setSelection(this.selection)};d.clearSelection=function(){this.input.setSelection({offset:this.getLength(),length:0})};d.setHint=function(a){a=a&&!a.hasRTL()&&!b("Locale").isRTL()?a.toArray().map(i):[];this.input.setHint(a)};d.isSelectionAtEnd=function(){return this.input.isSelectionAtEnd()};d.selectInput=function(a){this.input.setSelection({offset:a||0,length:this.getLength()})};return c}(b("mixin")(b("ArbiterMixin")));Object.assign(a.prototype,{events:["change","focus","blur"]});e.exports=a}),null); __d("FacebarTypeaheadCore",["csx","cx","invariant","Arbiter","ArbiterMixin","Base64","CSS","DOM","Event","FacebarGlobalOptions","FacebarJSConstants","FacebarKeywordSearchUtils","FacebarResultStoreUtils","FacebarStructuredText","FacebarTypeaheadInput","FacebarURI","Keys","KeywordsSearchResultConfig","Parent","URI","WorkGalahadEntityKey","WorkGalahadLayoutUtils","WorkGalahadNavActions","WorkGalahadNavStore","WorkGalahadSearchActions","WorkplaceSearchTypeaheadConfigs","generateBrowseSessionID","getActiveElement","gkx","immutable","mixin","nullthrows"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("WorkGalahadLayoutUtils").HeaderType,k;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){var d;d=a.call(this)||this;d.events=["session","focus","select","change","execute","blur","focusStartTime","open"];d._squashedEntityIDsByQuery=b("immutable").Map();d._ignoreNextBlur=!1;Object.assign(babelHelpers.assertThisInitialized(d),c);k=babelHelpers.assertThisInitialized(d);return d}var d=c.prototype;d.init=function(a,c,d){__p&&__p();if(window.getSelection===null)throw new Error("Facebar: window.getSelection is null!");this.init=function(){};this.data=a;this.view=c;this.root=d;this.facebarRoot=b("Parent").bySelector(d,"._585-");this.button=b("DOM").find(this.facebarRoot,"._4w98");this.windowFocused=!0;this.isFocused=!1;this.hoverAnimation=null;this.stickyQuery=null;this.settedQuery=null;this.selectedQuery=null;this.currentQuery=null;this.isSuggestionBagdeVisible=!1;this.initSubcomponents();this.initEvents();this.checkValue();this.checkSingleState();this.checkLocal();this.checkCategoryName()};d.initSubcomponents=function(){var a=b("DOM").find(this.root,"._5861");this.input=new(b("FacebarTypeaheadInput"))(a);this.view.setInputElement(this.input.getRawInputElement())};d.initEvents=function(){__p&&__p();var a=this;b("Event").listen(this.root,"keydown",this.keydown.bind(this));b("Event").listen(this.root,"keyup",this.keyup.bind(this));b("Event").listen(this.root.parentNode,"mousedown",this.mousedown.bind(this));this.view.onMousedown(this.viewMousedown.bind(this));b("Event").listen(window,"focus",this.focusWindow.bind(this));b("Event").listen(window,"blur",this.blurWindow.bind(this));this.view.subscribe("select",this.selectView.bind(this));this.view.subscribe("highlight",this.highlightView.bind(this));this.view.subscribe("render",this.highlightView.bind(this));this.input.subscribe("focus",this.focusInput.bind(this));this.input.subscribe("blur",this.blurInput.bind(this));this.input.subscribe("change",this.changeInput.bind(this));this.data.subscribe("activity",this.typeaheadActivity.bind(this));this.data.subscribe("respond",this.completeData.bind(this));this.data.subscribe("nullstateReady",this.performQueryIfVisible.bind(this));b("Arbiter").subscribe("FacebarTypeahead.clearRecentSearches",function(){return a.clearRecentSearches()});b("Event").listen(this.button,"click",this.buttonDownOrClick.bind(this));b("Event").listen(this.button,"mousedown",this.buttonDownOrClick.bind(this));b("Event").listen(this.button,"mouseup",this.buttonUp.bind(this));setTimeout(this.initFocus.bind(this),0)};d.ignoreNextBlur=function(){this._ignoreNextBlur=!0};d.focus=function(){this.input.focus()};d.initFocus=function(){!this.lazyFocused&&b("DOM").contains(this.input.root,b("getActiveElement")())&&(this.lazyFocused=!0,this.isFocused=!0,this._newSession(),this.inform("focus",{catchup:!0}),this.open(!0))};d.setStartTime=function(a){this.inform("focusStartTime",{time:a})};d.cleanQuery=function(a){a=babelHelpers["extends"]({},a)||{};a.structure||(a.structure=new(b("FacebarStructuredText"))());(!b("FacebarGlobalOptions").allowGrammar||b("FacebarJSConstants").nonGrammarTypes[a.type])&&(a.structure=b("FacebarStructuredText").fromString(a.structure.toString()));a.structure instanceof b("FacebarStructuredText")||i(0,3869);return a};d._unlockQuery=function(){var a=this.input.getValue();a.hasType("ent")&&a.trim().getCount()===1&&(this.input.storeSelection(),this.input.setValue(b("FacebarStructuredText").fromString(a.toString())),this.input.restoreSelection())};d.setPageQuery=function(a){a=this.cleanQuery(a);var b=this.input.getValue(),c=a.structure;b=!c.isEmptyOrWhitespace()&&(b.isEmptyOrWhitespace()||!b.matches(c));return this.selectQuery(a,b)};d.selectQuery=function(a,b){b=b!==!1;a=this.cleanQuery(a);(b||!this.selectedQuery)&&((b||this.getValue().isEmptyOrWhitespace())&&this.setQuery(a),this.selectedQuery=a);return a};d.completeSelection=function(){var a=this.view.getSelection();if(a&&!a.search){this.data.saveResult(a);a.structure=a.structure.pad();this.setQuery(a);return!0}return!1};d.setQuery=function(a,c){c===void 0&&(c=!0),a=this.cleanQuery(a),a.structure.hasType("blank")&&(a.structure=new(b("FacebarStructuredText"))(a.structure.toArray().filter(function(a){return a.getType()!="blank"}))),this.input.setValue(a.structure),this.settedQuery=a,this.stickyQuery=c===!1?this.stickyQuery:a,this.checkValue(),this.checkSingleState(),this.checkLocal(),this.checkCategoryName()};d.checkValue=function(a){a===void 0&&(a=!1);if(!a&&this.value&&this.value.getHash()===this.input.getValue().getHash())return;this.performQueryIfVisible();this.showSearchSuggestionBadgeIfPossible()};d.showSearchSuggestionBadgeIfPossible=function(){this.isNullState()?!this.isSuggestionBagdeVisible&&this.data.resultStore.injectedSuggestionCount&&(b("Arbiter").inform("FacebarTypeahead.showSuggestionBadge"),this.isSuggestionBagdeVisible=!0):this.isSuggestionBagdeVisible&&(b("Arbiter").inform("FacebarTypeahead.hideSuggestionBadge"),this.isSuggestionBagdeVisible=!1)};d.checkSingleState=function(){var a=this.input.getValue();this.data.setSingleState(a.getCount()===1&&a.hasType("ent"))};d.checkLocal=function(){var a=this.input.getValue();this.data.setLocal(a.getCount()===1&&a.isLocal())};d.checkCategoryName=function(){var a=this.input.getValue();a.getCategoryName()!==null&&this.data.setCategoryName(a.getCategoryName())};d.isNullState=function(){return this.input.getValue().getHash()===""};d.performQueryIfVisible=function(){if(!this.view.visible)return;this.performQuery()};d.performQuery=function(){this.value=this.nextQuery=this.getValue(),this.view.resetIndex(),this.data.query(this.nextQuery),this.currentQuery=this.nextQuery};d.executeQuery=function(a){this._browseSessionID=b("generateBrowseSessionID")({appName:"www",edge:"keywords_search"});var c=this.isNullState();a=this.cleanQuery(a);this._setSquashedEntityIDsFromQuery(a);var d=this.inform("execute",a),e=this.getSessionID();this.close();b("FacebarGlobalOptions").allowGrammar?this.selectQuery(a):this.selectQuery();a.type!=="shortcut"&&(!c||a.isInjectedSuggestion)&&(a.isInjectedSuggestion&&(b("Arbiter").inform("FacebarTypeahead.removeInjectedSuggestion"),--this.data.resultStore.injectedSuggestionCount,this.performQuery()));d||this._navigateToQuery(a,e,a.csid)};d.getSearchType=function(){return"facebar"};d._newSession=function(){if(this._sessionID!=null)return;this._sessionID=Math.random().toString();this.inform("session",this._sessionID,"state")};d._closeSession=function(){this._sessionID=null,this.inform("session",null,"state")};d.getSessionID=function(){return this._sessionID};d.getBrowseSessionID=function(){return this._browseSessionID};d._navigateToQuery=function(a,c,d){__p&&__p();var e=this.data.facebarConfig;if(a.uri){a.uri.addQueryData(a.extra_uri_params);a.uri.addQueryData({ref:"br_tf"});var f=a.uid!=null&&a.uid.match(/^[0-9]+$/)!=null;if(a.structure&&(a.type=="websuggestion"||a.type==b("KeywordsSearchResultConfig").result_type||a.type=="grammar"&&(!e||String(a.uri.getPath()).startsWith(e.search_path))||f)){e=this.data.getRawStructure(a.structure).text_form;f=b("Base64").encode(encodeURIComponent(e)).replace(/\=+$/,"");e={sid:c,qs:f,gv:this.data.getQueryData().grammar_version,ent_ids:this.getSquashedEntityIDsFromQueryString(String(a)),bsid:this._browseSessionID,preloaded_entity_ids:null,preloaded_entity_type:null,ref:"br_tf",csid:null,high_confidence_argument:null,client_time_ms:Date.now()};d&&(e.csid=d);a.uri.addQueryData({ref:b("FacebarKeywordSearchUtils").encodeFacebarURIParams(e),bs:a.alternateSemantic})}a.uri.addQueryData({epa:"SEARCH_BOX"});b("WorkplaceSearchTypeaheadConfigs").unifySearchBox&&b("WorkGalahadNavStore").getSelectedAppTabID()==="chats"&&a.type==="user"&&(a.uri=b("FacebarURI").getChatURI(a));if(a.type==="keyword"&&!a.isSeeMessages){c=b("WorkGalahadNavStore").getActiveEntityKeys();f=b("WorkGalahadLayoutUtils").getHeaderType(c);b("WorkGalahadNavActions").markPendingTransition({appTabID:"home",entityKeys:f!==j.SEARCH?[b("WorkGalahadEntityKey").forSearch("keywords_search")]:c,uri:b("nullthrows")(a.uri)})}b("WorkGalahadSearchActions").setQuery(a.text.toString());a.uri.go();return}};d.reset=function(){this.selectQuery(),this.inform("reset"),this.showSearchSuggestionBadgeIfPossible(),b("FacebarKeywordSearchUtils").clearSelectedTabInfo()};d.open=function(a){this.view.show(this.facebarRoot.offsetWidth),this.input.focus({catchup:a}),this.checkValue(!0),this.checkSingleState(),this.checkLocal(),this.checkCategoryName(),this.highlightButton(),this.isFocused||(this.isFocused=!0,this._newSession(),this.inform("focus")),this.inform("open",{catchup:a,sessionID:this._sessionID})};d.close=function(){__p&&__p();this._closeSession();if(this.inform("close")===!1)return;(!this.value||this.value.isEmptyOrWhitespace())&&this.selectedQuery?this.input.setValue(this.selectedQuery.structure):this.stickyQuery&&this.input.setValue(this.stickyQuery.structure);this.input.setHint(null);this.view.hide();this.view.setAutoSelect(!1);this.inform("session",null,"state");this.isFocused=!1;this.unlightButton()};d.getElement=function(){return this.root};d.getValue=function(){return this.input.getValue()};d.getText=function(){return this.getValue().toString()};d.submitQuery=function(a){__p&&__p();if(this.view.index<0){var c=this.input.getValue(),d=this.data.getRawStructure(c);if(d&&!d.is_empty){d=d.raw_text?d.raw_text:b("FacebarResultStoreUtils").getRawTextFromStructured(c.toArray());c=b("FacebarKeywordSearchUtils").makeFacebarEntry(d);c.position=a;this.inform("magSearch",c);this.executeQuery(c)}}else this.view.select()};d.keydown=function(a){__p&&__p();var c=!0,d=b("Event").getKeyCode(a);a.metaKey===!0&&(this.metaOnKeyDown=!0);this.isFocused||this.open();switch(d){case b("Keys").ESC:b("gkx")("817376")?(this.selectQuery(),this.view.highlight(-1)):this.input.blur();break;case b("Keys").UP:this.view.prev();break;case b("Keys").DOWN:this.view.next();break;case b("Keys").RETURN:var e=-2;this.submitQuery(e);break;case b("Keys").PAGE_UP:this.view.first();break;case 222:e=this.input.value.trim();!a.getModifierState("shift")&&e.endsOnType("ent")&&this.input.setValue(e);c=!1;break;default:if(b("gkx")("817376")&&this.input.value!=null&&this.input.value.toString()===""){if(d===b("Keys").LEFT||d===b("Keys").RIGHT){this.view.getSelection()==null?c=!1:d===b("Keys").LEFT?this.view.prevColumn():this.view.nextColumn();break}}else if(d===b("Keys").RIGHT){c=this.input.isSelectionAtEnd()&&this.completeSelection();break}e=d<=46&&d!==8&&d!==32;var f=d>=112&&d<=126,g=d===144||d===145;d=d===91||d===92||d===93||d===224;!e&&!f&&!g&&!a.metaKey&&!d&&(this.data.setSingleState(!1),this.data.setLocal(!1));this.stickyQuery=null;c=!1;break}this.input.storeSelection();c?(a.preventDefault(),a.stopPropagation()):b("gkx")("817376")&&this.view.highlight(-1)};d.keyup=function(a){var c=b("Event").getKeyCode(a),d=c<=46&&c!==8&&c!==32,e=c>=112&&c<=126,f=c===144||c===145;c=c===91||c===92||c===93||c===224;!d&&!e&&!f&&!a.metaKey&&!c&&!this.metaOnKeyDown&&this._unlockQuery();c||(this.metaOnKeyDown=!1)};d.mousedown=function(a){this.input.storeSelection()};d.viewMousedown=function(a){this.mousedown(a),a.preventDefault()};d.focusWindow=function(){this.windowFocused=!0};d.blurWindow=function(){this.windowFocused=!1};d.selectView=function(a,c){__p&&__p();if(!c||!c.selected)return;a=this.cleanQuery(c.selected);if(this.view.getCurrentColumnIndex()>0){var d=b("DOM").scry(c.element,'[role="gridcell"]')[this.view.getCurrentColumnIndex()];d=b("DOM").find(d,"a");d.click();return}this.inform("select",c);Boolean(c.skipExecuteQuery)||this.executeQuery(a)};d.highlightView=function(){var a=this.view.getSelection();this.input.setHint(a?a.structure:null)};d.blurInput=function(){var a=this;if(this._ignoreNextBlur){this._ignoreNextBlur=!1;return}setTimeout(function(){(a.windowFocused||b("URI").getRequestURI().getSubdomain()==="apps")&&(a.input.togglePlaceholder(),a.close())},0)};d.changeInput=function(){this.inform("change"),this.checkValue(),this.checkLocal(),this.inform("change_end")};d.focusInput=function(){this.open(),this.input.togglePlaceholder(!1)};d.updateData=function(){this.view.setLoading(this.loading)};d.completeData=function(a,b){if(b.forceDisplay||this.value&&this.value.matches(b.value)){a=!b.results.length;this.view.render(b.value,b.results,b.isAsync,a);this.tabQueued&&this.completeSelection()&&delete this.tabQueued}};d.typeaheadActivity=function(a,b){this.fetching=b.activity,this.loading!==this.fetching&&(this.loading=this.fetching,this.updateData())};d.getNameTextFromSelected=function(){var a=this.settedQuery&&this.settedQuery.semantic,b=this.data.facebarConfig&&this.data.facebarConfig.name_functions;a=a&&b&&a.match(/[a-z-]+\([^()]+\)/g);if(a)for(var c=0;c0?g.SUCCESS:g.NO_RESULTS)});this.data.subscribe("fetchError",function(b,c){b=c.fetch_context;c=b.value;if(b.bootstrap||!c)return;a.backendQueriesStatus[c]&&(a.backendQueriesStatus[c].status=g.ERROR,a._addDurationForBackendQuery(a.backendQueriesStatus[c]))});this.data.subscribe("query",function(a,b){this.recordAvgStat("num_results_from_cache",b.results.length)}.bind(this));this.data.subscribe("backend_topreplace",function(a,b){!1===this._topreplace&&(this.recordStat("backend_topreplace",1),this._topreplace=!0)}.bind(this));this.data.subscribe("completeFetch",function(a,b){if(this.core.scubaInfo){a=b.response;b={recv:b.stats.fetch_end-b.stats.fetch_start,render:Date.now()-b.stats.fetch_start,payload_size:JSON.stringify(a).length};a.payload.entities||(a.payload.entities=this.buildResults());this.logToScuba(a,b,this.core.scubaInfo,this.query,this.type)}}.bind(this));this.data.subscribe("completeCacheFetch",b("throttle")(function(b,c){a.core.scubaInfo&&a.logToScuba({},{},a.core.scubaInfo,a.query,a.type)},500));b("Event").listen(this.element,"keydown",function(a){this.recordStat("keypressed",1),this.recordCountStat("count_keys_pressed"),b("Event").getKeyCode(a)==b("Keys").BACKSPACE?!this._backspacing&&this.query&&(this._backspacing=!0,this.recordAppendStat("before_backspace_queries",this.query)):this._backspacing=!1,this._firstKeypressTime==null&&(this._firstKeypressTime=Date.now())}.bind(this));this.data.subscribe("beforeFetch",function(a,b){a=b.request.data?b.request.data.value:null;if(!a)return;this.backendQueries.push(a);this.backendQueriesStatus[a]={status:g.WAITING,start_time:Date.now()}}.bind(this))};c.recordStat=function(a,b){this.stats[a]=b};c.recordCountStat=function(a){var b=this.stats[a];this.stats[a]=b?b+1:1};c.recordAvgStat=function(a,b){this.avgStats[a]?(this.avgStats[a][0]+=b,++this.avgStats[a][1]):this.avgStats[a]=[b,1]};c.recordAppendStat=function(a,b){Object.prototype.hasOwnProperty.call(this.appendStats,a)||(this.appendStats[a]=[]),this.appendStats[a].push(b)};c.recordRender=function(a){__p&&__p();this.results=a.filter(function(a){return a.uid!="search"&&a.type!="disabled_result"&&a.type!="header"}).map(function(a){return babelHelpers["extends"]({},a)});a=null;this.queryStartTime&&(a=this.queryStartTime[this.query]);var c=this.results.every(function(a){return a.fromCache||a.isSeeMore}),d=this.results.every(function(a){return a.isFromGSEF||a.fromCache||a.isSeeMore||a.isJSBootstrapMatch})&&this.results.some(function(a){return a.isFromGSEF}),e=this.results.every(function(a){return a.isGloballyCachedKeyword||a.fromCache||a.isSeeMore||a.isJSBootstrapMatch})&&this.results.some(function(a){return a.isGloballyCachedKeyword}),f=this.results.every(function(a){return a.isNullState}),g=this.results.every(function(a){return a.isSingleState}),h=this.results.every(function(a){return a.exactMatchKeyword||a.isSeeMore});this.allFromSingleState=g;this.allFromNullState=f;if(this.results.length&&this.data.lastNullOrSingleStateFetchStartTime&&f)this.recordStat("time_render_null_state",Date.now()-this.data.lastNullOrSingleStateFetchStartTime),this.data.lastNullOrSingleStateFetchStartTime=null;else if(this.data.lastNullOrSingleStateFetchStartTime&&this.results.length&&g)this.recordStat("time_render_single_state",Date.now()-this.data.lastNullOrSingleStateFetchStartTime);else if(a){f=Date.now()-a;h?this.recordAppendStat("times_render_gs_echo",f):this.recordAppendStat(c?"times_render_local":"times_render_remote",f);!c&&d&&this.recordAppendStat("time_render_gs_early_fetch",f);!c&&e&&this.recordAppendStat("time_render_globally_cached_keywords",f);!c&&!d&&!e&&this.recordAppendStat("time_render_remote_main_call",f)}this.data.lastNullOrSingleStateFetchStartTime=null;g=b("Vector").getViewportDimensions();this.recordStat("window_size_width",g.x);this.recordStat("window_size_height",g.y);this.results.length>0&&!this.stats.first_result_time&&this.recordStat("first_result_time",Date.now());a="typed";this.allFromNullState?a="nullstate":this.allFromSingleState&&(a="singlestate");this.recordStat("last_state",a)};c.recordSelectInfo=function(a){__p&&__p();var c=a.selected,d=a.index;c.groupIndex!==void 0&&(d=a.index-c.groupIndex-1);var e={href:c.path},f=c.dataGT?{gt:JSON.parse(c.dataGT)}:{};b("clickRefAction")("click",e,null,null,f);if(c.uid=="search"||c.uid=="people_search")this.recordStat("selected_position",this.results!=null?this.results.length:0),this.recordStat("selected_search",1);else if(c.uid=="invite")this.recordStat("selected_invite",1);else{e=c.log_type||c.rankType||c.render_type||c.type;f=e=="friend"?"user":e;this.recordStat("selected_"+f,1);this.recordStat("selected_position",d);this.recordStat("selected_type",e);this.recordStat("selected_name_length",c.text.length);this.recordStat("selected_id",c.uid);this.recordStat("selected_degree",c.bootstrapped?1:2);this.recordStat("selected_recent_search",c.recent_search);f=b("TokenizeUtil").parse(this.data.getTextToIndex(c)).tokens;d=h(f,this.query);d&&this.recordStat("matched_terms",d);this.recordStat("selected_text",c.text)}var g={};this._extraRecorder.forEach(function(b){b(a,this.results,g)}.bind(this));this.recordStat("extra_select_info",JSON.stringify(g));this.recordStat("selected_with_mouse",a.clicked?1:0)};c._addDurationForBackendQuery=function(a){a.start_time&&(a.duration=Date.now()-a.start_time,delete a.start_time)};c._dataToSubmit=function(){__p&&__p();this.recordStat("candidate_results",this.buildResults());this.recordStat("query",this.query);this.recordStat("init_time",this.initTime);this.initStartTime&&(this.recordStat("init_start_time",this.initStartTime),this.recordStat("onload_time",this._onloadTime),this.initStartTime=0);this.recordStat("bootstrapped",this.bootstrapStats.bootstrapped);this.bootstrapStats.endTime&&(this.recordStat("bootstrapped_time",this.bootstrapStats.endTime),this.recordStat("user_bootstrap_ms",this.bootstrapStats.user),this.recordStat("other_bootstrap_ms",this.bootstrapStats.other),this.bootstrapStats.endTime=0);var a=this.data.getBootstrapError();a&&this.recordStat("bootstrap_error",1);this.recordStat("coeff2_ts",this.bootstrapStats.coeff2_ts);this.recordStat("max_results",this.data._maxResults);if(this.backendQueries.length>0){this.backendQueries.length>this.data.logBackendQueriesWindow&&(this.backendQueries=this.backendQueries.slice(this.backendQueries.length-this.data.logBackendQueriesWindow));this.recordStat("backend_queries",this.backendQueries);a=b("whitelistObjectKeys")(this.backendQueriesStatus,this.backendQueries);b("mapObject")(a,this._addDurationForBackendQuery,this);this.recordStat("backend_queries_status",a)}if(b("FacebarGlobalOptions").taSessionLoggingSample){var c=[];this.results.forEach(function(a){c.push([a.text||"",a.category||"",a.subtext||""])});this.recordStat("raw_suggestions_text",c)}a=this.stats;for(var d in this.avgStats){var e=this.avgStats[d];a[d]=e[0]/e[1]}for(var f in this.appendStats)a[f]=JSON.stringify(this.appendStats[f]);return a};c.buildResults=function(){var a=(this.results||[]).map(function(a,c){var d=b("TokenizeUtil").parse(this.data.getTextToIndex(a)).tokens,e=a.rankType||a.render_type||a.type,f=a.log_type,g=a.bootstrapped?1:0,i=a.s_token||"",j=typeof a.index==="undefined"?100:a.index;d=h(d,this.query)||this.query;var k=a.index_rank,l=a.match_type,m=a.l_type,n=a.vertical_type,o=a.prefix_match,p=a.prefix_length,q=a.text,r=a.category,s=a.subtext,t=a.fromCache,u=a.isNullState,v=a.isSingleState,w=a.logInfo;return typeof a.groupIndex==="number"?[a.groupIndex,a.indexInGroup,a.uid,e,g,i,d,k,l,o,p,a.origIndex,m,n,q,r,s,j,t,u,v,w,f]:[0,c,a.uid,e,g,i,d,k,l,o,p,a.origIndex,m,n,q,r,s,j,t,u,v,w,f]}.bind(this));return JSON.stringify(a)};c.submit=function(){var a=this._dataToSubmit();switch(this.data.recordingRoute){case"banzai_vital":b("Banzai").post(this._banzaiRoute,a,{delay:0,retry:!0});break;default:this.submitThroughAsyncRequest(a)}this._reset()};c.addLatencyToSample=function(a,b,c,d){a.addInteger(d+"query_start",c.queryStart),a.addInteger(d+"query_end",c.queryEnd),a.addInteger(d+"keypress_query_end",c.keyPressToQueryEnd),a.addInteger(d+"render",c.render),a.addInteger(d+"keypress_render",c.keyPressToRender),b[d+"query_start"]=c.queryStart,b[d+"query_end"]=c.queryEnd,b[d+"keypress_query_end"]=c.keyPressToQueryEnd,b[d+"render"]=c.render,b[d+"keypress_render"]=c.keyPressToRender};c.logToScuba=function(a,c,d,e,f){__p&&__p();var g=this,h={},i=new(b("BanzaiScuba"))("search_facebar_js",null,{addBrowserFields:!0,addPredictedGeographyFields:!0,addUser:!0,addSearchVersion:!0,addGatekeepers:{facebarGKs:!0}});i.addInteger("sample_rate",d.sample_rate);h.sample_rate=d.sample_rate;i.addNormal("site",d.site);h.site=d.site;i.addDenorm("query",e);h.query=e;d=a.payload||{};d.entities&&(i.addInteger("num_entities",d.entities.length),h.num_entities=d.entities.length);Object.keys(this.performanceTimings).forEach(function(a){i.addInteger(a,g.performanceTimings[a]),h[a]=g.performanceTimings[a]},this);if(d.results||d.entries){var j=(d.results||d.entries).length;i.addInteger("num_results",j);h.num_results=j}d.gzipped_payload_size!==void 0&&(i.addInteger("gzipped_payload_size",d.gzipped_payload_size),h.gzipped_payload_size=d.gzipped_payload_size);c.recv&&c.render>c.recv&&(i.addInteger("time_render",c.render-c.recv),h.time_render=c.render-c.recv,i.addInteger("time_js_async",c.recv),h.time_js_async=c.recv);c.payload_size&&(i.addInteger("payload_size",c.payload_size),h.payload_size=c.payload_size);this.stats.time_render_null_state&&(!e||e.length===0)&&(i.addInteger("time_render_null_state",this.stats.time_render_null_state),h.time_render_null_state=this.stats.time_render_null_state);i.addInteger("query_id",a.queryId);h.query_id=a.queryId;i.addDenorm("user_id",b("CurrentUser").getID());h.user_id=b("CurrentUser").getID();i.addDenorm("session_id",this.stats.sid);h.session_id=this.stats.sid;i.addNormal("typeahead_type",f);h.typeahead_type=f;c.remoteQueryLatencies&&(this.addLatencyToSample(i,h,c.remoteQueryLatencies,"remote_"),i.addInteger("remote_keypress_query_dispatch",c.remoteQueryLatencies.keyPressToQueryDispatch),h.remote_keypress_query_dispatch=c.remoteQueryLatencies.keyPressToQueryDispatch,i.addInteger("remote_keypress_query_start",c.remoteQueryLatencies.keyPressToQueryStart),h.remote_keypress_query_start=c.remoteQueryLatencies.keyPressToQueryStart,i.addNormal("inflight_requests",c.remoteQueryLatencies.inflightRequests),i.addInteger("inflight_requests",c.remoteQueryLatencies.inflightRequests),h.inflight_requests=c.remoteQueryLatencies.inflightRequests,i.addNormal("waiting_queries",c.remoteQueryLatencies.waitingQueries),i.addInteger("waiting_queries",c.remoteQueryLatencies.waitingQueries),h.waiting_queries=c.remoteQueryLatencies.waitingQueries);c.cacheQueryLatencies&&this.addLatencyToSample(i,h,c.cacheQueryLatencies,"cache_");i.post();b("BanzaiNectar").log("search_facebar_js","typeahead",h)};c.submitThroughAsyncRequest=function(a){Object.keys(a).length>0&&new(b("AsyncRequest"))().setURI(this._endPoint).setMethod("POST").setData({stats:a}).setOption("handleErrorAfterUnload",!0).setErrorHandler(function(c){a.retry=!0,new(b("AsyncRequest"))().setURI(this._endPoint).setMethod("POST").setData({stats:a}).setOption("asynchronous_DEPRECATED",!1).send()}.bind(this)).send()};return a}();var h=function(a,c){__p&&__p();if(!a||!c)return;c=b("TokenizeUtil").parse(c);if(c.flatValue[c.flatValue.length-1]===" ")return c.flatValue;var d=c.tokens[c.tokens.length-1],e={};a.forEach(function(a){e[a]=(e[a]||0)+1});var f={};c=c.tokens.slice(0,c.tokens.length-1);c.forEach(function(a){f[a]=(f[a]||0)+1});for(var g=0;g0){c.push(h);return c.join(" ")}}return void 0};Object.assign(a.prototype,{_endPoint:"/ajax/typeahead/record_metrics.php",_banzaiRoute:"search"});e.exports=a}),null); __d("FacebarTypeaheadRecorder",["Arbiter","CurrentUser","Event","FacebarGlobalOptions","FacebarJSConstants","FacebarTimerUtils","Keys","SearchFunnelLogger","SearchTypeaheadRecorder","URI","clickRefAction"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(b){__p&&__p();b=a.call(this,b)||this;b.userText="";b.nullStateCandidates=null;b.singleStateCandidates=null;b.queryTimes={};b._sessionDisabled=!1;b.type="facebar";b._maxQueryID=0;b._isQueryMatch=!0;b._bootstrapSize=null;return b}var d=c.prototype;d.initEvents=function(a){__p&&__p();var c=this;a.getCore().subscribe("session",function(a,b){b===null?this.sessionEnd():this.sessionStart(b)}.bind(this));a.getCore().subscribe("select",function(a,b){this.recordStat("time_between_select_and_last_render",Date.now()-this._lastRenderTime),this._firstKeypressTime!=null&&this.recordStat("keypress_to_select_time",Date.now()-this._firstKeypressTime),this.recordSelectInfo(b)}.bind(this));a.getCore().subscribe("magSearch",function(a,b){this.recordMagSearch(b)}.bind(this));a.getCore().input.subscribe("shortcut",function(a,b){this.recordShortcut(b)}.bind(this));a.getCore().subscribe("quickSelectRedirect",function(a,b){this.recordQuickSelectInfo(b)}.bind(this));a.getView().subscribe("render",function(a,b){if(this.data._isInjectedSuggestionFlow)return;this.recordRender(b);this.allFromNullState?this.nullStateCandidates=this.buildListTypeaheadRecords():this.allFromSingleState&&(this.singleStateCandidates=this.buildListTypeaheadRecords());this._lastRenderTime=Date.now()}.bind(this));a.getView().subscribe("show",function(a,b){if(!this.data.lastNullOrSingleStateFetchStartTime)return;this.recordStat("time_render_null_state",Date.now()-this.data.lastNullOrSingleStateFetchStartTime);this.data.lastNullOrSingleStateFetchStartTime=null}.bind(this));a.getView().subscribe("logPerformanceTiming",function(a,b){c.performanceTimings[b.field]=b.value});a.data.subscribe("query",function(a,c){c.value.isEmpty()||this.recordCountStat("num_queries"),this.recordAvgStat("num_results_from_cache",c.results.length),this.queryTimes[c.queryId]={send:b("FacebarTimerUtils").getTimestamp()}}.bind(this));a.data.subscribe("sending_request",function(a,b){a=b.data.value;if(!a)return;this.backendQueries.push(a)}.bind(this));a.subscribe("navigation",function(a,b){b&&b.structure&&(this.recordStat("navigation_input",JSON.stringify(b.structure.toStruct())),this.recordStat("navigation_text",b.structure.toString()))}.bind(this));a.data.subscribe("response_received",function(a,c,d){if(this.queryTimes[c.queryId]){a=this.queryTimes[c.queryId];a.recv=b("FacebarTimerUtils").getTimestamp()-a.send;c&&c.payload&&(a.payload_size=JSON.stringify(c.payload).length)}}.bind(this));a.data.subscribe("remote_query_latency",function(a,b){if(this.queryTimes[b.queryId]){a=this.queryTimes[b.queryId];a.remoteQueryLatencies=b.latencies}}.bind(this));a.data.subscribe("cache_query_latency",function(a,b){if(this.queryTimes[b.queryId]){a=this.queryTimes[b.queryId];a.cacheQueryLatencies=b.latencies}}.bind(this));a.data.subscribe("backend_response",function(a,c){if(this.queryTimes[c.queryId]){a=this.queryTimes[c.queryId];a.render=b("FacebarTimerUtils").getTimestamp()-a.send;c.payload.incomplete&&(a.incomplete=!0);a.backendInfo=c.payload.info;this.core.scubaInfo&&this.logToScuba(c,a,this.core.scubaInfo,c.inputQuery,this.type)}}.bind(this));a.getCore().subscribe("change",function(a,b){this.userInput(this.core.getText())}.bind(this));a.data.subscribe("remote_query_match",function(a,b){this._maxQueryID0&&(this.backendQueries.length>this.data.logBackendQueriesWindow&&(this.backendQueries=this.backendQueries.slice(this.backendQueries.length-this.data.logBackendQueriesWindow)),this.recordStat("backend_queries",this.backendQueries));if(b("FacebarGlobalOptions").taSessionLoggingSample){var e=[];this.results.forEach(function(a){e.push([a.text||"",a.category||"",a.subtext||""])});this.recordStat("raw_suggestions_text",e)}this.recordStat("experience_type","gsv2");for(var f in this.appendStats)a[f]=JSON.stringify(this.appendStats[f]);return a};d.getDataToSubmit=function(){return this._dataToSubmit()};d.reset=function(){return this._reset()};d.submit=function(){this._sessionDisabled||a.prototype.submit.call(this),this.view.inform("feedback"),this._reset()};return c}(b("SearchTypeaheadRecorder"));Object.assign(a.prototype,{_sessionEnded:!0,_extraRecorder:[],_banzaiRoute:"facebar"});e.exports=a}),null); __d("FacebarTypeaheadDebugPane.react",["React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.renderDebugText=function(a){return b("React").createElement("div",{key:a},a)};d.render=function(){return b("React").createElement("div",{className:"fsm pam"},this.props.result.debug.map(this.renderDebugText))};return c}(b("React").Component);e.exports=a}),null); __d("FacebarTypeaheadDiffText.react",["cx","React","TextWithEmoticons.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.renderDiff=function(a,c){return b("React").createElement("span",{className:"diffNode _5td3",key:c},b("React").createElement(b("TextWithEmoticons.react"),{text:a}))};d.renderParts=function(){var a=this.props.prefix,c=this.props.text;if(a==null)return[this.renderDiff(c,0)];var d=c.toLowerCase().indexOf(a.toLowerCase());a=a.trim();d===0&&(c=c.slice(a.length));c=c.split(/\b/).map(this.renderDiff);d===0&&c.unshift(b("React").createElement(b("TextWithEmoticons.react"),{key:"prefix",text:a}));return c};d.render=function(){return b("React").createElement("span",this.props,this.renderParts())};c.generatePrefixes=function(a,b){var c=[],d,e;for(var f=0,g=b.length;f0?" _55y-":"")+(!c.category&&!c.subtext?" _2vzo":"")+(!c.category&&!!c.subtext||c.category&&c.category.toString().indexOf(a)<0&&!c.subtext?" _2vzp":"")+(c.category&&!!c.subtext||c.category&&c.category.toString().indexOf(a)>0?" _2vzq":"");a=this.renderUnseenPosts();c=b("React").createElement("span",{className:c},this.renderText(),this.props.hideBadge?null:this.renderBadge(),a,this.props.token);a="_7gk"+(this.props.message?" _5byz":"");return b("React").createElement("span",{className:a},c,this.props.message)};d.renderMain=function(){var a=b("React").createElement("a",{className:"_6i1",href:this.props.result.uri},b("React").createElement("span",null,this.props.icon||this.renderIcon(),this.renderLabel(),this.renderSecondaryIcon()));this.props.result.isAsync&&(a=b("React").createElement("a",{className:"_6i1",href:"#",ajaxify:this.props.result.asyncURI,rel:"async"},b("React").createElement("span",null,this.props.icon||this.renderIcon(),this.renderLabel(),this.renderSecondaryIcon())));return b("React").createElement("span",{className:"_205",rel:"ignore"},this.renderActivityLogXButton(),a)};d.renderActivityLogXButton=function(){if(this.props.result.keywordBootstrapType!==b("FacebarJSConstants").keywordBootstrapTypes.recent)return null;var a=new(b("URI"))("/me/allactivity");a.setQueryData({privacy_source:"activity_log",log_filter:"search"});return b("React").createElement(b("XUICloseButton.react"),{size:"medium",className:"_2d9t",href:a})};d.renderDebug=function(){return this.props.result.debug?b("React").createElement(b("FacebarTypeaheadDebugPane.react"),{result:this.props.result}):null};d.render=function(){var a=this.props.result;a="_202 _5bl2 _6_k _1et7 _28vg"+(a.isCelebrity?" _5g-n":"")+(a.isSeeMore?" _qbs":"")+(a.isInjectedSuggestion?" _3kxm":"")+(a.isTrending||a.isHappeningNow?" _5g-o":"")+(a.isRecent?" _jsd":"")+(a.isLocal?" _1821":"")+(a.isFootball?" _1822":"")+(a.isHashtag?" _4z1b":"")+(a.isPhotos?" _4z1c":"")+(a.isVideos?" _4z1d":"")+(a.isInvalidated||a.is_inactive?" _44vm":"");return b("React").createElement("li",{className:b("joinClasses")(a,this.props.className),onClick:this.props.onClick,onMouseDown:this.props.onMouseDown,onMouseEnter:this.props.onMouseEnter,role:"row"},b("React").createElement("div",{role:"gridcell"},this.renderMain(),this.renderDebug()))};return c}(b("React").Component);a.defaultProps={valign:!0};e.exports=a}),null); __d("FacebarTypeaheadToken.react",["cx","FacebarTypeaheadHighlightedText.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=" \xb7 ";a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){__p&&__p();var a=this,c=this.props.text.map(function(a){return String(a)});this.props.limit&&c.splice(this.props.limit);c.forEach(function(b,d){(d!==0||a.props.leadingMiddot)&&(c[d]=h+b)});var d=c.shift(),e;d!=null&&(e=b("React").createElement(b("FacebarTypeaheadHighlightedText.react"),{className:this.props.mainClass,tokens:this.props.highlight,text:d}));var f;c.length>0&&(f=b("React").createElement(b("FacebarTypeaheadHighlightedText.react"),{tokens:this.props.highlight,className:"_53ab",text:c.join("")}));d=this.props.innerClass||"_53aa";return b("React").createElement("span",{className:"_53a9"},b("React").createElement("span",{className:d},e,f))};return c}(b("React").Component);e.exports=a}),null); __d("FacebarTypeaheadTokenText",["FbtResultBase","HTML","getElementText"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="\xb7";function h(a){if(a instanceof b("FbtResultBase"))return a.toString();else if(typeof a==="object")return b("getElementText")(b("HTML")(a).getRootNode());else return String(a)}function i(a){return h(a).split(g).map(function(a){return a.trim()})}function j(a){var b={};return a.filter(function(a){var c=String(a),d=!b[c];b[c]=!0;return a!=null&&a!==""&&d})}a={textForEntity:function(a,b){b=a.category||b[a.type]||"";var c=a.subtext||"";a=a.boldedSubtext||"";b=i(b).concat(i(a)).concat(i(c));return j(b)},text:function(a){return j(i(a))}};e.exports=a}),null); __d("FacebarTypeaheadEntityItem.react",["ix","cx","CurrentUser","FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","FacebarTypeaheadTokenText","Image.react","React","RoundImage.react","TypeaheadFacepileX.react","asset"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.renderToken=function(){return b("React").createElement(b("FacebarTypeaheadToken.react"),{highlight:this.getHighlightTokens(),text:b("FacebarTypeaheadTokenText").textForEntity(this.props.result,{}),category:this.props.result.category})};d.renderIcon=function(){__p&&__p();var a=this.props.result;if(a.isNullState){var c=a.icon_class?b("React").createElement("span",{className:a.icon_class}):b("React").createElement(b("Image.react"),{className:"_20h",src:a.photo});return b("React").createElement("span",null,c)}if((a.type==="user"||a.type==="page")&&a.photo)return b("React").createElement(b("RoundImage.react"),{className:"_20h",src:a.photo});if((a.type==="group"||a.type==="event")&&a.photo)return b("React").createElement(b("Image.react"),{className:"_20h _7a55",src:a.photo});if(a.size>1&&a.photos)return b("React").createElement(b("TypeaheadFacepileX.react"),{className:"_51l_",photos:a.photos,size:a.size});else if(a.photo)return b("React").createElement(b("Image.react"),{className:"_20h",alt:"",src:a.photo});else if(b("CurrentUser").isWorkUser()&&!a.isInviteCoworkers)return b("React").createElement(i,{result:a});return null};d.getHighlightTokens=function(){if(this.props.result.original_query==null)return null;var a=this.props.result.original_query.toString().trim(),b=a.split(" ");b=b.length>1?[a].concat(b):[a];return b.filter(function(a){return a!==""})};d.render=function(){var a=babelHelpers["extends"]({},this.props,{icon:this.renderIcon(),token:this.renderToken(),highlight:this.getHighlightTokens(),valign:!0});return b("React").createElement(b("FacebarTypeaheadItem.react"),a)};return c}(b("React").Component);function i(a){__p&&__p();a=a.result;var c="_20h",d=null;switch(a.type){case"user":d=g("489501");break;case"page":a.category_type==="MEETING_ROOM"?d=g("794183"):d=g("669566");break;case"group":d=g("542240");break;case"event":d=g("534788");break}return d==null?null:b("React").createElement("div",{className:c},b("React").createElement(b("Image.react"),{className:"_7g-z",src:d}))}e.exports=a}),null); __d("FacebarTypeaheadKeywordItem.react",["cx","fbt","CurrentUser","FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","FacebarTypeaheadTokenText","React","joinClasses"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a="";b("CurrentUser").isWorkUser()?a=[h._("Search Workplace")]:a=[h._("Search Facebook")];this.props.result.isTrending?a.push(h._("Trending")):this.props.result.type=="related"&&(a=[h._("Related search")]);var c=b("FacebarTypeaheadTokenText").textForEntity(this.props.result,{});c!=null&&c.length&&(a=c);c=c!=null&&(c.length>1||this.props.result.boldedSubtext!=null);var d=this.props.result.isSeeMore;d=d?null:b("React").createElement(b("FacebarTypeaheadToken.react"),{text:a,mainClass:(c?"_4jt7":"")+(c&&this.props.result.isSpecialIntent&&!this.props.result.isLocal?" _21z1":"")+(c&&this.props.result.isLocal?" _2xfl":"")+(c&&this.props.result.isPhotos?" _21z2":"")+(c&&this.props.result.isVideos?" _21z4":"")+(c&&this.props.result.isSingleState&&this.props.result.exactMatchKeyword&&!this.props.result.isLocal?" _21z5":""),innerClass:"_53ab"});return b("React").createElement(b("FacebarTypeaheadItem.react"),babelHelpers["extends"]({},this.props,{className:b("joinClasses")(this.props.className,"_5d77"),token:d,prefix:this.props.result.query_string.toLowerCase(),showSecondaryIcon:!1}))};return c}(b("React").Component);e.exports=a}),null); __d("FacebarTypeaheadMessengerThreadIcon.react",["cx","React","WorkGalahadImage.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();function a(a){__p&&__p();a.className;a=a.result;a=a.participantImgs;if(!Array.isArray(a))return null;if(a.length===1)return h(a[0],0,32);a=a.slice(0,2);return b("React").createElement("div",{className:"_7ev9"},a.map(function(a,b){return h(a,b,23)}))}function h(a,c,d){return b("React").createElement("div",{className:"_7eva",key:c},b("React").createElement(b("WorkGalahadImage.react"),{src:a,height:d,type:"circle",width:d}))}e.exports=a}),null); __d("FacebarTypeaheadMessengerThreadItem.react",["cx","fbt","FacebarTypeaheadItem.react","FacebarTypeaheadMessengerThreadIcon.react","FacebarTypeaheadToken.react","React"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=babelHelpers["extends"]({},this.props,{icon:b("React").createElement(b("FacebarTypeaheadMessengerThreadIcon.react"),{result:this.props.result,className:"_20h",size:36}),token:this.renderToken(),valign:!0});return b("React").createElement(b("FacebarTypeaheadItem.react"),a)};d.renderToken=function(){var a=[h._("Chat")];return b("React").createElement(b("FacebarTypeaheadToken.react"),{text:a,category:this.props.result.category})};return c}(b("React").Component);e.exports=a}),null); __d("FacebarTypeaheadNodeItem.react",["DOM","React","ReactDOM","isElementNode"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.props.result.node;return b("React").createElement("li",this.props,b("isElementNode")(a)?null:a)};d.attachNode=function(){var a=b("ReactDOM").findDOMNode(this);if(a==null)return;var c=this.props.result.node;b("isElementNode")(c)&&b("DOM").setContent(a,c)};d.componentDidMount=function(){this.attachNode()};d.componentDidUpdate=function(){this.attachNode()};d.shouldComponentUpdate=function(a){return this.props.result.node!==a.result.node};return c}(b("React").Component);e.exports=a}),null); __d("FacebarTypeaheadRecentItem.react",["cx","FacebarGlobalOptions","FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","Image.react","React","RoundImage.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){return b("React").createElement(b("FacebarTypeaheadItem.react"),babelHelpers["extends"]({},this.props,{token:this.renderToken(),icon:this.renderIcon(),recentSearchItem:!0}))};d.renderToken=function(){return this.props.result.subtext?b("React").createElement(b("FacebarTypeaheadToken.react"),{text:[this.props.result.subtext]}):null};d.renderIcon=function(){var a=this.props.result;if((a.type==="user"||a.type==="page")&&a.photo)return b("React").createElement(b("RoundImage.react"),{className:"_20h",src:a.photo});if((a.type==="group"||a.type==="event")&&a.photo)return b("React").createElement(b("Image.react"),{className:"_20h _7a55",src:a.photo});if(!b("FacebarGlobalOptions").allowGrammar)return b("React").createElement(b("Image.react"),{className:"_20h",src:a.photo});var c=a.icon_class?b("React").createElement("span",{className:a.icon_class}):b("React").createElement(b("Image.react"),{className:"_20h",src:a.photo});return b("React").createElement("span",{className:a.icon_class?"_k83":""},c)};return c}(b("React").Component);e.exports=a}),null); __d("XTypeaheadReportController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ajax/typeahead/search_suggestion_report/",{search_suggestion:{type:"String",required:!0},typed_query:{type:"String",required:!0},__asyncDialog:{type:"Int"}})}),null); __d("FacebarTypeaheadSimpleItem.react",["ix","cx","fbt","AbstractButton.react","FacebarGlobalOptions","FacebarJSConstants","FacebarRemoveRecentSearchButton.react","FBLogger","Image.react","Locale","React","RoundImage.react","SearchSuggestionsHighlighter","XTypeaheadReportController","fbglyph","gkx","joinClasses","killswitch","mayHaveConnectedCharacters","qex"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();function j(a){__p&&__p();a=a.result;var c=a.displayStructure!=null?a.displayStructure:a.structure;c=c!=null?c.toString():"";var d=c;a.keywordType!==b("FacebarJSConstants").keywordTypes.escape&&!a.isNullState&&(c=c.toLowerCase());var e=a.query_string?a.query_string.toLowerCase():null;if(!b("killswitch")("SEARCH_WWW_DISABLE_TYPEAHEAD_HIGHLIGHTING")&&!b("mayHaveConnectedCharacters")(c)&&e!=null&&!a.isSeeMore)try{c=b("SearchSuggestionsHighlighter").highlightNonMatch(e,c)}catch(a){b("FBLogger")("search").catching(a).mustfix("Error highlighting search suggestion (%s) for query (%s)",d,e)}return b("Locale").isRTL()?b("React").createElement("div",{className:"_19bk"},c,"\u200e"):b("React").createElement("div",{className:"_19bk"},c)}function k(a){a=a.result;if(!a.isNullState||!b("FacebarGlobalOptions").logSERPClickAsRecentSearch)return null;var c="_19bl",d;a.photo!=null&&(d=b("React").createElement(b("RoundImage.react"),{className:b("joinClasses")(c,"_19bm"),src:a.photo,width:"24",height:"24"}));d==null&&(d=b("React").createElement(b("Image.react"),{className:c,src:g("126434"),width:"16",height:"16"}));return d!=null?b("React").createElement("div",{className:"_19bp"},d):null}function a(a){var c=a.onClick,d=a.onMouseEnter,e=a.onMouseDown;a=a.result;var f;if(b("gkx")("678803")&&!a.isNullState&&!a.isSeeMore){var g=b("XTypeaheadReportController").getURIBuilder().setString("search_suggestion",String(a.text)).setString("typed_query",a.query_string).getURI();f=b("React").createElement("div",{role:"gridcell"},b("React").createElement(b("AbstractButton.react"),{className:"_6auy",href:"#",ajaxify:g,image:b("React").createElement("div",{className:"_7h01"}),label:i._("Give feedback for suggestions item in typeahead"),role:"link",labelIsHidden:!0,rel:"dialog"}))}g=b("qex")._("889797")&&a.isNullState?b("React").createElement("div",{role:"gridcell"},b("React").createElement(b("FacebarRemoveRecentSearchButton.react"),{recentSearch:String(a.text)})):null;return b("React").createElement("div",null,b("React").createElement("li",{className:"_202 _19bq"+(a.isSeeMore?" _19br":""),onMouseDown:e,onMouseEnter:d,role:"row"},b("React").createElement("div",{role:"gridcell",className:"_7g_o"},b("React").createElement("a",{onClick:c,href:a.uri,className:"_19bs"},b("React").createElement(k,{result:a}),b("React").createElement(j,{result:a}))),f,g))}e.exports=a}),null); __d("FacebarTypeaheadList.react",["csx","cx","fbt","invariant","CSS","CurrentUser","FacebarGlobalOptions","FacebarJSConstants","FacebarTypeaheadEntityItem.react","FacebarTypeaheadKeywordItem.react","FacebarTypeaheadMessengerThreadItem.react","FacebarTypeaheadNodeItem.react","FacebarTypeaheadRecentItem.react","FacebarTypeaheadSimpleItem.react","JSResource","LoadingIndicator.react","React","ReactFlareEventUtils","StaticContainer.react","WorkGalahadChatSearchAddThreadID","lazyLoadComponent"],(function(a,b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=b("ReactFlareEventUtils").createFromReactFlareEvent,l=b("lazyLoadComponent")(b("JSResource")("WorkGalahadSearchTypeaheadEntityItem.react").__setRef("FacebarTypeaheadList.react")),m=b("lazyLoadComponent")(b("JSResource")("WorkGalahadSearchTypeaheadKeywordItem.react").__setRef("FacebarTypeaheadList.react")),n=b("lazyLoadComponent")(b("JSResource")("WorkGalahadSearchTypeaheadMessengerItem.react").__setRef("FacebarTypeaheadList.react")),o=b("lazyLoadComponent")(b("JSResource")("WorkGalahadSearchTypeaheadPostItem.react").__setRef("FacebarTypeaheadList.react")),p={related:b("FacebarTypeaheadKeywordItem.react")};p[b("FacebarJSConstants").browseTypes.keyword]=b("FacebarTypeaheadKeywordItem.react");p[b("FacebarJSConstants").keywordType]=b("FacebarTypeaheadKeywordItem.react");p[b("FacebarJSConstants").messengerThreadsType]=b("FacebarTypeaheadMessengerThreadItem.react");a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g0||this.props.isNullState?(c.loading=!1,d.loading=!1):d.results.length===0?d.loading=!1:c.loading=!1;var e=!!d.results.length,f=!!c.results.length,g=!1,i=!1,j=this.copyProps(d),k=this.copyProps(d);this.props.isNullState&&(j.results=this.props.entityResults.filter(function(a){return!!a.isRecent}),k.results=this.props.entityResults.filter(function(a){return!!a.isWorkplacePost}),g=!!j.results.length,i=!!k.results.length);var l="EDIT_SEARCH_HISTORY";l=new(b("URI"))("/me/allactivity").addQueryData({privacy_source:"activity_log",log_filter:"search",entry_point:l});var m=h._("Recent Searches"),n=h._("Quick Post Access");m=b("React").createElement("div",{key:"recent",className:g?"":"hidden_elem"},this.props.isGalahadSearch?b("React").createElement(b("WorkGalahadNavHeader.react"),{title:m,indented:!1,action:b("gkx")("997564")?{}:{href:l,title:h._("Edit"),showOnHover:!1}}):b("React").createElement(b("LeftRight.react"),{className:"_3zsi _1ejo"},m,b("React").createElement(b("Link.react"),{href:l,"data-testid":"recent_searches_edit"},h._("Edit"))),g?b("React").createElement(b("FacebarTypeaheadList.react"),j):null);l=b("React").createElement("div",{key:"post",className:(!i||!this.props.isGalahadSearch?"hidden_elem":"")+(g?" _3-8z":"")},b("React").createElement(b("WorkGalahadNavHeader.react"),{title:n,indented:!1}),i?b("React").createElement(b("FacebarTypeaheadList.react"),k):null);j=b("React").createElement("div",{key:"keyword",className:this.props.isNullState||!f?"hidden_elem":""},this.props.isNullState?null:b("React").createElement(b("FacebarTypeaheadList.react"),c));g=b("React").createElement("div",{key:"entity",className:e?"":"hidden_elem"},b("React").createElement(b("FacebarTypeaheadList.react"),d));n=[];this.props.isNullState?n=[j,m,l,g]:n=[j,g];i=b("React").createElement("div",{className:"_3-xd"+(this.props.seeMoreResult==null||this.props.isNullState?" hidden_elem":"")},b("React").createElement(b("FacebarTypeaheadList.react"),a));return b("React").createElement("div",{className:"_21r"},this.props.isGalahadSearch?i:null,n,b("React").createElement("div",{className:!this.props.isNullState||!f?"hidden_elem":""},this.props.isNullState?b("React").createElement(b("FacebarTypeaheadList.react"),c):null),this.props.isGalahadSearch?null:i,this.props.isGalahadSearch&&this.props.listProps.loading?b("React").createElement(b("WorkGalahadChannelItemChromeList.react"),{type:"search",amount:1}):null)};return c}(b("React").Component);e.exports=a}),null); __d("FacebarTypeaheadView",["csx","cx","fbt","Arbiter","ContextualLayer","ContextualLayerUpdateOnScroll","CSS","DOM","FacebarGlobalOptions","FacebarJSConstants","FacebarStructuredText","FacebarTypeaheadGSV2List.react","Parent","React","ReactDOM","ScriptPath","Style","SubscriptionList","TypeaheadView","performanceNow"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j="unimplemented";a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c,d){__p&&__p();var e;e=a.call(this,c,d)||this;e.handleClearHighlight=function(){e.highlight(e.getDefaultIndex(),!1)};e.handleHighlight=function(a){e.highlight(e.getIndexOf(a,e.results),!1),e.resetColumn()};e.handleSelect=function(a){e.handleHighlight(a),e.select(!0)};e.handleRender=function(){e.items=e.getItems()};e.isGalahadEnabled=Boolean(d.isGalahadEnabled);e.isNewClassicSearch=Boolean(d.isNewClassicSearch);e.element=c;e.sid="";e.index=-1;e.warningShown=!1;e.autoSelect=!1;e.flipCount=0;e.loading=!1;e.events=["highlight","render","filter","show"];e.mousedownSubscriptions=new(b("SubscriptionList"))();return e}var d=c.prototype;d.init=function(){this.initializeElements()};d.onMousedown=function(a){this.mousedownSubscriptions.add(a)};d.initGSV2Elements=function(){this.element,this.results=[],this.keywordResults=[],this.entityResults=[]};d.initializeElements=function(){var a=this,c=this.element;Event.listen(this.element,"mousedown",function(b){return a.mousedownSubscriptions.fireCallbacks(b)});this.content=b("DOM").find(c,"._21r");this.warningNode=b("DOM").find(c,"._553e");this.resultsContainer=b("DOM").create("div");this.initGSV2Elements()};d.initializeList=function(){this.renderTypeaheadList(),this.content.appendChild(this.resultsContainer)};d.initializeLayer=function(){this.layer=new(b("ContextualLayer"))({context:b("Parent").bySelector(this.causalElement,"._585-"),position:"below",causalElement:this.causalElement,shouldSetARIAProperties:!1,"data-testid":"search_typeahead_view"},this.element).enableBehavior(b("ContextualLayerUpdateOnScroll"));var a=this.layer.getRoot();a.setAttribute("role","grid");a=this.layer.getContentRoot();this.root=b("DOM").find(a,"._50c9");b("CSS").addClass(a,"_5tlx");b("CSS").addClass(a,"_5xzd");this.wrapper=a};d.setInputElement=function(a){this.setAccessibilityControlElement(a),this.causalElement=a,this.isGalahadEnabled||this.initializeLayer(),this.initializeList()};d.setAutoSelect=function(a){this.autoSelect=a,this.index===-1&&a&&this.first()};d.getIndexOf=function(a,b){for(var c=0;c-1&&this.results.splice(a,1);this.seeMoreResult=null}!this.isNullState()&&!b&&(this.seeMoreResult=this.inform("seeMore",{value:c,results:this.results}),this.seeMoreResult&&(this.isGalahadEnabled?this.results.unshift(this.seeMoreResult):this.results.push(this.seeMoreResult),this.inform("afterSeeMore",{results:this.results})))};d.buildResultsNoRegeneration=function(a,c){this.buildResultsData(a,c);a=b("performanceNow")();this.renderTypeaheadList({results:this.results,loading:this.loading});this.inform("logPerformanceTiming",{field:"build_results_set_props_duration",value:b("performanceNow")()-a})};d.buildResults=function(a){var b=a.some(function(a){return a.isSingleState});this.buildResultsNoRegeneration(a,b);return this.resultsContainer};d.getGSV2Items=function(){return a.prototype.getItems.call(this).filter(function(a){return!b("CSS").matchesSelector(a,"._3su")})};d.getItems=function(){return this.getGSV2Items()};d.render=function(c,d,e,f){this.inform("filter",{results:d,value:c});var g=!c||c instanceof b("FacebarStructuredText")&&c.isEmptyOrWhitespace();this.isGalahadEnabled||b("CSS").conditionClass(this.wrapper,"_5qz2",!d.length&&g);var h=d[0];f&&!g||(h&&h.results_set_type===j?h.error_info.suppress||this.showWarning(h.error_info.errorMessage||i._("This search isn't currently supported.")):this.hideWarning());d=d.filter(function(a){return a.results_set_type!==j});a.prototype.render.call(this,c,d,e)};d.reset=function(){this.index=-1;this.items=[];this.results=[];this.value="";this.buildResults([]);this.inform("reset");return this};d.resetIndex=function(){this.index=this.getDefaultIndex()};d.showWarning=function(a){b("CSS").show(this.warningNode),b("DOM").setContent(this.warningNode,a),this.warningShown=!0,this.highlight(-1,!1)};d.hideWarning=function(){b("CSS").hide(this.warningNode),this.warningShown=!1,this.highlight(this.index,!1)};d.setLoading=function(a){this.loading!=a&&(this.loading=a,this.renderTypeaheadList({results:this.results,loading:a}))};d.first=function(){this.index=this.autoSelect?0:-1,this.highlight(this.index)};d.prev=function(){(this.index<0||this.index===0&&this.autoSelect)&&(this.index=this.items.length),this.ignoreMouseover=!0,a.prototype.prev.call(this)};d.next=function(){this.autoSelect&&this.index>=this.items.length-1&&(this.index=-1),this.ignoreMouseover=!0,a.prototype.next.call(this)};d.$FacebarTypeaheadView1=function(a,b){var c=this.results.length-1;a>c?a=-1:a<-1&&(a=c);this.index=a;c={controlledHighlight:!0,highlightedResult:this.results[this.index],loading:this.loading,results:this.results};b&&this.inform("highlight",{index:a,selected:this.results[a]});this.visible&&this.renderTypeaheadList(c)};d.highlight=function(b,c){if(this.isNewClassicSearch)this.$FacebarTypeaheadView1(b,c!==!1);else{c=c!==!1&&this.index!==b;var d=this.warningShown||!this.autoSelect?-1:0;a.prototype.highlight.call(this,Math.max(d,b),c)}};d.isNullState=function(){return!String(this.value).trim()};d.copyProps=function(a){return babelHelpers["extends"]({accessibilityElement:this.accessibilityElement,onClearHighlight:this.handleClearHighlight,onHighlight:this.handleHighlight,onRender:this.handleRender,onSelect:this.handleSelect},a)};d.renderGSV2TypeaheadList=function(a,c){b("ReactDOM").render(b("React").createElement(b("FacebarTypeaheadGSV2List.react"),{results:this.results,listProps:a,keywordResults:this.keywordResults,entityResults:this.entityResults,seeMoreResult:this.seeMoreResult,isNewClassicSearch:this.isNewClassicSearch,isNullState:this.isNullState(),accessibilityElement:this.accessibilityElement,onClearHighlight:this.handleClearHighlight,onHighlight:this.handleHighlight,onRender:this.handleRender,onSelect:this.handleSelect}),c)};d.renderTypeaheadList=function(a){a=a||{},this.renderGSV2TypeaheadList(a,this.resultsContainer)};return c}(b("TypeaheadView"));e.exports=a}),null); __d("XWarmUserRequestArgsController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/search/browse/warm/requestargs/",{query:{type:"String"},csid:{type:"String"}})}),null); __d("FacebarTypeaheadBrowsePreload",["AsyncRequest","XWarmUserRequestArgsController","emptyFunction"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(a){this._core=a.core,this._typeahead=a}var c=a.prototype;c.enable=function(){this._core.subscribe("execute",this.preloadOnNavigate.bind(this))};c.preloadOnNavigate=function(a,c){if(c.type==="keyword"){a=b("XWarmUserRequestArgsController").getURIBuilder().setString("query",String(c.text));c.csid&&a.setString("csid",String(c.csid));new(b("AsyncRequest"))().setURI(a.getURI()).setAllowCrossPageTransition(!0).setOption("suppressErrorAlerts",!0).send()}};c.disable=function(){b("emptyFunction")()};return a}();e.exports=a}),null); __d("FacebarTypeaheadInjectedSuggestion",["csx","cx","fbt","Arbiter","DOM"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=3,k=0,l;a=function(){__p&&__p();function a(a){this.core=a.getCore(),this.$1=this.core.view}var c=a.prototype;c.enable=function(){var a=this;b("Arbiter").subscribe("FacebarTypeahead.injectedSuggestion",function(){return a.addSuggestionTextToSearchBox()});b("Arbiter").subscribe("FacebarTypeahead.removeInjectedSuggestion",function(){return a.removeSuggestionTextToSearchBox()});b("Arbiter").subscribe("FacebarTypeahead.showSuggestionBadge",function(){return a.showSuggestionBadge(!0)});b("Arbiter").subscribe("FacebarTypeahead.hideSuggestionBadge",function(){return a.showSuggestionBadge(!1)})};c.disable=function(){this.$2.unsubscribe()};c.showSuggestionBadge=function(a){var c=b("DOM").scry(this.core.getElement(),"._5861")[0];if(c){c=c.getElementsByClassName("injectedSearchSuggestion")[0];if(!c)return;a?c.style.visibility="visible":c.style.visibility="hidden"}};c.removeSuggestionTextToSearchBox=function(){__p&&__p();if(!k)return;--k;if(!k){var a=b("DOM").scry(this.core.getElement(),"._5861")[0],c=a.getElementsByClassName("injectedSearchSuggestion")[0];a.removeChild(c)}else if(l){a=i._({"suggestion":"{suggestionCount} new suggestion","suggestions":"{suggestionCount} new suggestions"},[i._param("suggestionCount",k),i._enum(k===1?"suggestion":"suggestions",{suggestion:"suggestion",suggestions:"suggestions"})]);l.innerText=a}};c.addSuggestionTextToSearchBox=function(){__p&&__p();if(k)l&&k=c.length)break;g=c[f++]}else{f=c.next();if(f.done)break;g=f.value}g=g;var h=g[0];g=g[1];h in d||(g.active=!1)}for(var h=b("enumerate")(d),g=Array.isArray(h),f=0,h=g?h:h[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){if(g){if(f>=h.length)break;e=h[f++]}else{f=h.next();if(f.done)break;e=f.value}c=e;d=c[0];e=c[1];c={value:e,active:!0};a.filters[d]=c}}),b("Arbiter").subscribe(b("NavigationMessage").NAVIGATION_BEGIN,function(b,c){a.resetFiltersIfNotSearching()}),this.view.subscribe("filter",this.handleFilter.bind(this)),this.core.subscribe("magSearch",this.handleSearch.bind(this)),this.view.subscribe("afterSeeMore",this.handleSeeMore.bind(this)));b("Run").onLeave(function(){a.resetFiltersIfNotSearching()})};c.disable=function(){this.teardown()};c.teardown=function(){this.subscriptionsHandler.release()};c.handleFilter=function(a,b){a=b.results.filter(function(a){return!a.isNullState&&!a.isTrending});this.updateResultData(a)};c.handleSearch=function(a,b){this.updateResultData([b])};c.handleSeeMore=function(a,b){a=b.results.filter(function(a){return a.isSeeMore});this.updateResultData(a)};c.resetFiltersIfNotSearching=function(){__p&&__p();var a=this;if(g)return;g=!0;b("setTimeoutAcrossTransitions")(function(){__p&&__p();var c=window.location.pathname;if(c.indexOf(i)===-1)for(var c=b("enumerate")(a.filters),d=Array.isArray(c),e=0,c=d?c:c[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{e=c.next();if(e.done)break;f=e.value}f=f;f=f[1];f.active=!1}g=!1;b("Run").onLeave(function(){a.resetFiltersIfNotSearching()})},h)};c.updateResultData=function(a){__p&&__p();for(var c=0;c=f.length)break;i=f[h++]}else{h=f.next();if(h.done)break;i=h.value}i=i;var j=i[0];i=i[1];i.active?e[j]=i.value:d.uri.removeQueryData(j)}}}};return a}();e.exports=a}),null); __d("TypeaheadEarlyUserRequest",["AsyncRequest","XWarmUserRequestArgsController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){function a(a){this._core=a.getCore(),this._listener=null}var c=a.prototype;c.enable=function(){this._listener=this._core.subscribe("focus",function(a,c){new(b("AsyncRequest"))().setURI(b("XWarmUserRequestArgsController").getURIBuilder().getURI()).send(),this.disable()}.bind(this))};c.disable=function(){this._listener&&this._core.unsubscribe(this._listener)};return a}();e.exports=a}),null); __d("XSearchFacebarSurveyController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/search/facebar_survey/",{id:{type:"String",required:!0},query:{type:"String"},session_id:{type:"String",required:!0},on_session_start:{type:"Exists",defaultValue:!1},result_selected:{type:"Exists",defaultValue:!1}})}),null); __d("AbandonedSessionSurvey",["AsyncRequest","SubscriptionsHandler","XSearchFacebarSurveyController","getOrCreateDOMID"],(function(a,b,c,d,e,f){__p&&__p();a=function(){"use strict";__p&&__p();function a(a){var c=this;this.tryToSubmitSurvey=function(){c.searchBoxFocused&&(c.openSurvey(),c.resultSelected=!1,c.searchBoxFocused=!1)};this.core=a.getCore();this.data=a.getData();this.view=a.getView();this.subscriptionsHandler=new(b("SubscriptionsHandler"))()}var c=a.prototype;c.enable=function(){var a=this;this.subscriptionsHandler.addSubscriptions(this.core.subscribe("focus",function(){a.searchBoxFocused=!0,a.resultSelected=!1}),this.data.subscribe("beforeQuery",function(b,c){a.query=c.value||""}),this.view.subscribe("select",function(){a.resultSelected=!0,a.tryToSubmitSurvey()}),this.core.subscribe("blur",this.tryToSubmitSurvey))};c.disable=function(){this.subscriptionsHandler.release(),this.request&&this.request.abort()};c.openSurvey=function(){if(this.openedSurvey)return;this.openedSurvey=!0;var a=this.core.element;a==null&&(a=this.core.getElement());var c=this.normalizeValue(this.query);a=b("XSearchFacebarSurveyController").getURIBuilder().setString("id",b("getOrCreateDOMID")(a)).setString("query",c!=null?c:"").setString("session_id",this.data.queryData.sid).setExists("result_selected",this.resultSelected);this.request=new(b("AsyncRequest"))().setMethod("POST").setAllowCrossPageTransition(!0).setURI(a.getURI());this.request.send()};c.normalizeValue=function(a){return String(a).trim().replace(/\s+/g," ").replace(/[\u200E|\u200F|\u202a|\u202b|\u202c]/g,"").toLowerCase()};return a}();e.exports=a}),null); __d("WorkAdminLogger",["WorkAdminLoggerSessionID","WorkCommunityCenterTypedLogger"],(function(a,b,c,d,e,f){"use strict";a={getLogger:function(){var a=new(b("WorkCommunityCenterTypedLogger"))().setSessionID(b("WorkAdminLoggerSessionID").sessionID);return a}};e.exports=a}),null); __d("XWorkAdminBulkUploadDataAsyncController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/work/admin/bulk_upload/data/",{action_type:{type:"Enum",defaultValue:"create_users",enumType:1},upload_status:{type:"Enum",enumType:1}})}),null); __d("WorkAdminBulkInviteDataManager",["regeneratorRuntime","Promise","AsyncRequest","FBLogger","WorkAdminDispatcher","XWorkAdminBulkUploadDataAsyncController","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("WorkAdminDispatcher").dispatch;a={load:function(){__p&&__p();b("promiseDone")(function(){__p&&__p();var a;return b("regeneratorRuntime").async(function(c){__p&&__p();while(1)switch(c.prev=c.next){case 0:c.prev=0;c.next=3;return b("regeneratorRuntime").awrap(h());case 3:a=c.sent;g({type:"invites/loadedBulkInvites",data:a});c.next=10;break;case 7:c.prev=7,c.t0=c["catch"](0),b("FBLogger")("fb4c").catching(c.t0).warn("Error getting pending bulk invites data.");case 10:case"end":return c.stop()}},null,this,[[0,7]])}())}};function h(){return b("regeneratorRuntime").async(function(a){while(1)switch(a.prev=a.next){case 0:return a.abrupt("return",new(b("Promise"))(function(a){var c=b("XWorkAdminBulkUploadDataAsyncController").getURIBuilder().setEnum("action_type","launch_all").getURI();new(b("AsyncRequest"))(c).setMethod("POST").setHandler(function(b){a({bulk_invites:b.payload})}).send()}));case 1:case"end":return a.stop()}},null,this)}e.exports=a}),null); __d("WorkAdminBulkUploadDataManager",["regeneratorRuntime","Promise","AsyncRequest","WorkAdminDispatcher","XWorkAdminBulkUploadDataAsyncController","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("WorkAdminDispatcher").dispatch;a={load:function(a){__p&&__p();b("promiseDone")(function(){__p&&__p();var c;return b("regeneratorRuntime").async(function(d){__p&&__p();while(1)switch(d.prev=d.next){case 0:d.prev=0;d.next=3;return b("regeneratorRuntime").awrap(h(a));case 3:c=d.sent;d.t0=a;d.next=d.t0==="create_users"?7:d.t0==="bulk_edit"?9:11;break;case 7:g({type:"users/loadedBulkUploads",data:c});return d.abrupt("break",12);case 9:g({type:"users/bulkEditProgress",data:c});return d.abrupt("break",12);case 11:throw new Error("Action type not supported.");case 12:d.next=16;break;case 14:d.prev=14,d.t1=d["catch"](0);case 16:case"end":return d.stop()}},null,this,[[0,14]])}())}};function h(a){return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:return c.abrupt("return",new(b("Promise"))(function(c){var d=b("XWorkAdminBulkUploadDataAsyncController").getURIBuilder().setEnum("action_type",a).getURI();new(b("AsyncRequest"))(d).setMethod("POST").setHandler(function(a){c({uploads:a.payload})}).send()}));case 1:case"end":return c.stop()}},null,this)}e.exports=a}),null); __d("XAtWorkLaunchUsersUnitAnalyticsController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/atwork/admin/launchedunit/getinfo/",{})}),null); __d("WorkAdminInvitesDataManager",["regeneratorRuntime","Promise","AsyncRequest","WorkAdminDispatcher","XAtWorkLaunchUsersUnitAnalyticsController","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("WorkAdminDispatcher").dispatch;a={load:function(){__p&&__p();b("promiseDone")(function(){__p&&__p();var a;return b("regeneratorRuntime").async(function(c){__p&&__p();while(1)switch(c.prev=c.next){case 0:c.prev=0;c.next=3;return b("regeneratorRuntime").awrap(h());case 3:a=c.sent;g({type:"invites/handleLoad",data:a});c.next=10;break;case 7:c.prev=7,c.t0=c["catch"](0),g({type:"invites/handleError",error:c.t0});case 10:case"end":return c.stop()}},null,this,[[0,7]])}())}};function h(){return b("regeneratorRuntime").async(function(a){while(1)switch(a.prev=a.next){case 0:return a.abrupt("return",new(b("Promise"))(function(a,c){var d=b("XAtWorkLaunchUsersUnitAnalyticsController").getURIBuilder().getRequest_LEGACY_UNTYPED(new(b("AsyncRequest"))());d.setMethod("POST").setPayloadHandler(function(b){a({notLaunchedUsers:b.not_launched_users,totalActiveUsers:b.total_active_users})}).setErrorHandler(function(a){return c(a)}).send()}));case 1:case"end":return a.stop()}},null,this)}e.exports=a}),null); __d("WorkAdminBulkEditNavigationStore",["FluxReduceStore","WorkAdminDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=Object.freeze({ACCOUNTS_EDITED:"accounts_edited",CSV_UPLOAD:"csv_upload",PREVIEW_EDITED_ACCOUNTS:"preview_edited_accounts"});a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(b){b=a.call(this,b)||this;b.USERS_BULKEDIT_STEPS=g;return b}var c=b.prototype;c.getInitialState=function(){return{currentNavigation:{route:[g.CSV_UPLOAD],forwards:!0}}};c.reduce=function(a,b){switch(b.type){case"users/bulkEdit/showCSV":case"users/bulkEdit/uploadFailure":return{currentNavigation:this.$WorkAdminBulkEditNavigationStore1(a,[g.CSV_UPLOAD])};case"users/bulkEdit/uploadClick":case"users/bulkEdit/uploadSuccess":return{currentNavigation:this.$WorkAdminBulkEditNavigationStore1(a,[g.CSV_UPLOAD,g.PREVIEW_EDITED_ACCOUNTS])};case"users/bulkEdit/accountsUploaded":return{currentNavigation:this.$WorkAdminBulkEditNavigationStore1(a,[g.CSV_UPLOAD,g.PREVIEW_EDITED_ACCOUNTS,g.ACCOUNTS_EDITED])};default:return a}};c.$WorkAdminBulkEditNavigationStore1=function(a,b){return{route:b,forwards:b.length>=a.currentNavigation.route.length}};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("WorkAdminUploadUsersUtils",["LoadObject"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(a){__p&&__p();var b={};a.forEach(function(a){if(a.email==="")return;b[a.email]?b[a.email]+=1:b[a.email]=1});return a.map(function(a,c){c=a.errors;var d=c.indexOf("Duplicate Email");b[a.email]>1?d===-1&&c.push("Duplicate Email"):d>-1&&c.splice(d,1);return a})};a=function(a,c){a=a.getValueEnforcing();var d=a.csvFileRows.filter(function(a){return a!==c});return b("LoadObject").withValue({csvFileID:a.csvFileID,csvFileRows:g(d)})};c=function(a,c,d){a=a.getValueEnforcing();var e=a.csvFileRows.map(function(a){return a===c?d:a});return b("LoadObject").withValue({csvFileID:a.csvFileID,csvFileRows:g(e)})};e.exports={checkForDuplicateEmails:g,handleUserEdit:c,handleUserRemove:a}}),null); __d("WorkAdminBulkEditUsersCSVStore",["FluxReduceStore","LoadObject","WorkAdminDispatcher","WorkAdminUploadUsersUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("WorkAdminUploadUsersUtils").handleUserEdit,h=b("WorkAdminUploadUsersUtils").handleUserRemove;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return b("LoadObject").empty()};d.reduce=function(a,c){switch(c.type){case"users/bulkEdit/showCSV":case"users/bulkEdit/accountsUploaded":return b("LoadObject").empty();case"users/bulkEdit/uploadSuccess":return b("LoadObject").withValue(c.data);case"users/bulkEdit/removeUser":return h(a,c.data);case"users/bulkEdit/editUser":return g(a,c.data.toEdit,c.data.newInfo);default:return a}};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("WorkAdminBulkInviteStore",["FluxReduceStore","LoadObject","WorkAdminBulkInviteDataManager","WorkAdminDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=1e4,h=1e3;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f1?d===-1&&c.push("Duplicate Email"):d>-1&&c.splice(d,1);return a})};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("XWorkAdminBulkCreateUploadCSVController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/work/admin/bulkcreate/upload/",{header_mapping:{type:"StringToStringMap",defaultValue:{}},value_mapping:{type:"StringToStringMap",defaultValue:{}},session_id:{type:"Int",required:!0}})}),null); __d("WorkAdminSetupUsersUploadCSVStore",["errorCode","FileInputUploader","FluxReduceStore","WorkAdminDispatcher","WorkAdminLogger","WorkAdminSetupUsersFixableErrorCode","XAtWorkAdminPanelController","XWorkAdminBulkCreateUploadCSVController","immutable"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("WorkAdminDispatcher").dispatch;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return{errorContent:null,fileUploadTarget:null,preselectedCSVColumnToHeader:new Map(),showColumnMatcherDialog:!1,showLocaleSelectorDialog:!1,uploadFailed:!1}};d.reduce=function(a,b){switch(b.type){case"users/uploadClick":return this.$WorkAdminSetupUsersUploadCSVStore1(a,b.data.fileUploadTarget,b.data.sessionID);case"users/uploadFixableError":return b.data;case"users/uploadFailure":return babelHelpers["extends"]({},a,{showColumnMatcherDialog:!1,showLocaleSelectorDialog:!1,uploadFailed:!0});case"users/uploadClickColumnMatcher":return this.$WorkAdminSetupUsersUploadCSVStore1(a,b.data.fileUploadTarget,b.data.sessionID,b.data.csvColumnToHeader);case"users/uploadClickSemiRequiredColumnMatcher":return this.$WorkAdminSetupUsersUploadCSVStore1(a,b.data.fileUploadTarget,b.data.sessionID,b.data.csvColumnToHeader,b.data.headerToValue);default:return a}};d.$WorkAdminSetupUsersUploadCSVStore1=function(a,c,d,e,f){__p&&__p();var g=this;e===void 0&&(e=new Map());f===void 0&&(f=new Map());var h=c.files[0];e=b("XWorkAdminBulkCreateUploadCSVController").getURIBuilder().setStringToStringMap("header_mapping",b("immutable").Map(e).toJS()).setStringToStringMap("value_mapping",b("immutable").Map(f).toJS()).setInt("session_id",d).getURI();f=new(b("FileInputUploader"))(c).setURI(e).setFiles({file:h});f.subscribe("success",function(a,c){a=c.response.payload;b("XAtWorkAdminPanelController").getURIBuilder().setEnum("section","employees_bulk_action").getURI().addQueryData("snapshot_id",a.snapshot_id).go()});f.subscribe("failure",function(a,b){return g.$WorkAdminSetupUsersUploadCSVStore2(b.response,h.name,c)});f.send();return babelHelpers["extends"]({},a,{fileUploadTarget:c,uploadFailed:!1,showColumnMatcherDialog:!1,showLocaleSelectorDialog:!1})};d.$WorkAdminSetupUsersUploadCSVStore2=function(a,c,d){__p&&__p();if(b("WorkAdminSetupUsersFixableErrorCode")[a.error]){var e=new Map(Object.entries(a.payload)),f=a.error===1789053,g=!1;if(f){var i=Array.from(e.values());i.includes("locale")||(g=!0)}i=a.errorSummary?a.errorSummary.toString():"";h({type:"users/uploadFixableError",data:{errorContent:{errorDescription:a.errorDescription,errorSummary:i,errorKey:a.error.toString(),fileName:c},fileUploadTarget:d,preselectedCSVColumnToHeader:e,showColumnMatcherDialog:!f,showLocaleSelectorDialog:g,uploadFailed:!1}});return!1}this.$WorkAdminSetupUsersUploadCSVStore3(a,c);return!0};d.$WorkAdminSetupUsersUploadCSVStore3=function(a,c){var d=a.errorDescription?a.errorDescription.toString():"",e=a.error.toString();a=a.errorSummary?a.errorSummary.toString():"";b("WorkAdminLogger").getLogger().setEvent("upload_csv_file_failure").setSection("setup_users").addToExtraData("error_description",d).addToExtraData("error_key",e).addToExtraData("error_summary",a).addToExtraData("file_name",c).log();h({type:"users/uploadFailure"})};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("WorkAdminTaxInfoStore",["FluxReduceStore","LoadObject","WorkAdminDispatcher","WorkAdminPaymentDataManager"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){b("WorkAdminPaymentDataManager").loadPaymentTaxInfo();return b("LoadObject").loading()};d.reduce=function(a,c){switch(c.type){case"payments/TaxInfoLoaded":return b("LoadObject").withValue(c.data);case"payments/TaxInfoError":return b("LoadObject").withError(c.error);default:return a}};d.get=function(){return this.getState()};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("WorkAdminTransactionStore",["FluxReduceStore","LoadObject","WorkAdminDispatcher","WorkAdminPaymentDataManager"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){b("WorkAdminPaymentDataManager").loadAllTransactions();return b("LoadObject").loading()};d.reduce=function(a,c){switch(c.type){case"payments/TransactionsLoaded":return b("LoadObject").withValue(c.data);case"payments/TransactionsError":return b("LoadObject").withError(c.error);default:return a}};d.get=function(){return this.getState()};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("XWorkAdminUserTotalsAsyncController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/work/admin/user_totals/",{})}),null); __d("WorkAdminUserTotalsStore",["regeneratorRuntime","Promise","AsyncRequest","FluxReduceStore","LoadObject","WorkAdminDispatcher","XWorkAdminUserTotalsAsyncController","debounce","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("WorkAdminDispatcher").dispatch,h=100;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c;c=a.call(this,b("WorkAdminDispatcher"))||this;c.$WorkAdminUserTotalsStore2=function(){__p&&__p();b("promiseDone")(function(){__p&&__p();var a;return b("regeneratorRuntime").async(function(d){__p&&__p();while(1)switch(d.prev=d.next){case 0:d.prev=0;d.next=3;return b("regeneratorRuntime").awrap(c.$WorkAdminUserTotalsStore3());case 3:a=d.sent;g({type:"users/loadedTotals",data:a});d.next=9;break;case 7:d.prev=7,d.t0=d["catch"](0);case 9:case"end":return d.stop()}},null,this,[[0,7]])}())};c.$WorkAdminUserTotalsStore1=b("debounce")(c.$WorkAdminUserTotalsStore2,h);return c}var d=c.prototype;d.getInitialState=function(){return b("LoadObject").empty()};d.reduce=function(a,c){switch(c.type){case"users/loadedTotals":return b("LoadObject").withValue(c.data);default:return a}};d.get=function(){var a=this.getState();a.isEmpty()&&this.$WorkAdminUserTotalsStore1();return a};d.$WorkAdminUserTotalsStore3=function(){__p&&__p();return b("regeneratorRuntime").async(function(a){while(1)switch(a.prev=a.next){case 0:return a.abrupt("return",new(b("Promise"))(function(a){var c=b("XWorkAdminUserTotalsAsyncController").getURIBuilder().getURI();new(b("AsyncRequest"))(c).setHandler(function(b){b=b.payload;var c=Object.entries(b.byProviderMethod),d=Object.entries(b.byProviderMethodPending);return a({total:b.total,byProviderMethod:new Map(c),byProviderMethodPending:new Map(d)})}).send()}));case 1:case"end":return a.stop()}},null,this)};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a()}),null); __d("XWorkDomainsListAsyncController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/work/domains/fetch/",{})}),null); __d("WorkDomainsDataManager",["regeneratorRuntime","Promise","AsyncRequest","WorkAdminDispatcher","XWorkDomainsListAsyncController","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("WorkAdminDispatcher").dispatch;function h(){return b("regeneratorRuntime").async(function(a){while(1)switch(a.prev=a.next){case 0:return a.abrupt("return",new(b("Promise"))(function(a){var c=b("XWorkDomainsListAsyncController").getURIBuilder().getURI();new(b("AsyncRequest"))(c).setMethod("POST").setHandler(function(b){a({verified:b.payload.verified,notVerified:b.payload.notVerified,suggestedDomains:b.payload.suggestedDomains,whitelisted:b.payload.whitelisted})}).send()}));case 1:case"end":return a.stop()}},null,this)}a={loadDomains:function(a){__p&&__p();b("promiseDone")(function(){__p&&__p();var c;return b("regeneratorRuntime").async(function(d){__p&&__p();while(1)switch(d.prev=d.next){case 0:d.prev=0;d.next=3;return b("regeneratorRuntime").awrap(h());case 3:c=d.sent;g({type:"domains/showAllDomains",domains:c});a&&a(c);d.next=10;break;case 8:d.prev=8,d.t0=d["catch"](0);case 10:case"end":return d.stop()}},null,this,[[0,8]])}())},genDomainsData:h};e.exports=a}),null); __d("WorkDomainsStore",["FluxReduceStore","LoadObject","WorkAdminDispatcher","WorkDomainsDataManager","immutable","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record({domains:b("LoadObject").empty(),requestPending:!1,domain:"",error:null,removing:b("immutable").Set()}));a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return new g()};d.reduce=function(a,c){switch(c.type){case"domains/showAllDomains":return a.set("domains",b("LoadObject").withValue(c.domains));case"domains/addNewDomain":return a.merge({requestPending:c.requestPending,domain:c.domain,error:c.error});case"domains/removeDomain":return a.merge({removing:a.removing.add(c.domainId)});case"domains/domainRemovalSuccessful":return a.merge({removing:a.removing["delete"](c.domainId),domains:b("LoadObject").withValue(this.$WorkDomainsStore1(a.domains.getValueEnforcing(),c.domainId))});case"domains/domainRemovalFailed":return a.merge({removing:a.removing["delete"](c.domainId)});default:return a}};d.$WorkDomainsStore1=function(a,b){var c=function(a){return a.id!==b};return{notVerified:a.notVerified.filter(c),verified:a.verified.filter(c),suggestedDomains:a.suggestedDomains,whitelisted:a.whitelisted.filter(c)}};d.get=function(){var a=this.getState();a.domains.isEmpty()&&b("WorkDomainsDataManager").loadDomains();return a};d.getUnverifiedDomainByID=function(a){var b=[].concat(this.getState().domains.getValueEnforcing().notVerified,this.getState().domains.getValueEnforcing().whitelisted);return b.find(function(b){return b.id===a})};d.getUnverifiedDomainByIDEnforcing=function(a){return b("nullthrows")(this.getUnverifiedDomainByID(a))};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("WorkUserSetsStore",["FluxReduceStore","WorkAdminDispatcher","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record({dialog:{setInfo:null,newSetName:null,member:null,type:null,content:null,title:null,callback:function(){}}}));a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return new g()};c.reduce=function(a,b){switch(b.type){case"sets/showDialog":return new g(babelHelpers["extends"]({},a,{dialog:{setInfo:b.setInfo,newSetName:b.newSetName,member:b.member,type:b.dialogType,content:b.content,title:b.title,callback:b.callback}}));case"sets/hideDialog":return new g(babelHelpers["extends"]({},a,{dialog:babelHelpers["extends"]({},a.dialog,{member:null,setInfo:null,type:null})}));default:return a}};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("WorkAdminDispatcher"))}),null); __d("WorkAdminStores",["WorkAdminDispatcher","WorkAdminBulkUploadStore","WorkAdminBulkInviteStore","WorkAdminInvitesStore","WorkAdminSetupUsersCSVStore","WorkAdminSetupUsersUploadCSVStore","WorkAdminBulkEditNavigationStore","WorkAdminBulkEditUsersCSVStore","WorkAdminAccountInfoStore","WorkAdminPaymentMethodStore","WorkAdminTaxInfoStore","WorkAdminTransactionStore","WorkAdminUserTotalsStore","WorkDomainsStore","WorkAdminDirectSupportNavigationStore","WorkUserSetsStore","WorkAdminMembersStore","WorkAdminGalahadStore"],(function(a,b,c,d,e,f){"use strict";function a(){b("WorkAdminDispatcher").explicitlyRegisterStores([b("WorkAdminBulkUploadStore"),b("WorkAdminBulkInviteStore"),b("WorkAdminInvitesStore"),b("WorkAdminSetupUsersCSVStore"),b("WorkAdminSetupUsersUploadCSVStore"),b("WorkAdminBulkEditNavigationStore"),b("WorkAdminBulkEditUsersCSVStore"),b("WorkAdminAccountInfoStore"),b("WorkAdminPaymentMethodStore"),b("WorkAdminTaxInfoStore"),b("WorkAdminTransactionStore"),b("WorkAdminUserTotalsStore"),b("WorkDomainsStore"),b("WorkAdminDirectSupportNavigationStore"),b("WorkUserSetsStore"),b("WorkAdminMembersStore"),b("WorkAdminGalahadStore")])}e.exports={init:a}}),null);